Ruby on Rails
Monday, December 2, 2013
On Saturday, November 30, 2013 10:11:12 AM UTC, Ankur wrote:
Also, I missed adding create action in controller earlier, have added it now:def createTask.create params[:task]redirect_to :backend
Did you add a route for your create action ? That would also explain why tasks_path raises an exception (I was assuming you had resources :tasks in your routes). As Colin says, this sort of stuff is covered by most tutorials. This will also get you on the path of using standard naming conventions, which makes things a lot easier.
Fred
Thanks.--Regards,AnkurOn Sat, Nov 30, 2013 at 3:09 PM, Frederick Cheung <frederic...@gmail.com> wrote:--
On Friday, November 29, 2013 10:18:26 PM UTC, Ankur wrote:I have done db migration and db schema exists for table but "select * from tasks" doesn't return any rows and therefore UI doesn't show any form data. Can someone please help me debug this issue?So what does happen when you click on the form's button ? Did you look at your application logs / server output? At first glance you're posting to the wrong url - to create a new task you post to tasks_path where you have forced the url to task_path (which would be appropriate for updating an existing task).Fred
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .46cf8fba-f24b-4eec-896c- b87e5ee4bca8%40googlegroups. com
For more options, visit https://groups.google.com/groups/opt_out .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b94dbc61-bd14-4103-a268-a789da32b035%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment