Ruby on Rails Wednesday, July 1, 2015

Hello all,

When a controller is generated, rails adds an entry in routes.rb for that controller and action like this.
get 'monthly_reciept/new'

But it don't create helper for this route as in this eg:
get    'login'   => 'sessions#login'

Using the second route, I can write "login_path" in any view to redirect to login action.

But how can I use the default generated route inside view without customizing ? Surely I cannot give monthly_receipt/new_path right? I cannot find this in rails guides and rake routes doesn't show any helper for this route because there is no one.

Thank you

--
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/7cc49756-67fe-4a48-ad83-e9436012a956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment