Hello, I''m playing with a depot sample application from (Agile ...) and notice the following on a view: <%= link_to ''Edit'', edit_product_path(@product) %> | <%= link_to ''Back'', products_path %> I added a new model/view/controller, and in the view displayed all the methods, and notice that I have xxx_product_methods included. Where they come from? How can I add people_path for example if I added a people controller? Thanks very much. regards; fernando. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fernando Ruscitti <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> writes:> Hello, I''m playing with a depot sample application from (Agile ...) and > notice the following on a view: > > <%= link_to ''Edit'', edit_product_path(@product) %> | > <%= link_to ''Back'', products_path %> > > > I added a new model/view/controller, and in the view displayed all the > methods, and notice that I have xxx_product_methods included. > > Where they come from? How can I add people_path for example if I added a > people controller? >They come from the map.resources lines in config/routes.rb. See http://api.rubyonrails.org/classes/ActionController/Resources.html#M000696 for more information. to add such paths for a ''people'' controller, add a line like map.resources :people to config/routes.rb Cheers -- Eric> > Thanks very much. > regards; > fernando.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks very much Eric! fernando. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Monday, September 29, 2008 11:28:53 AM UTC-7, Eric Schulte wrote:> > They come from the map.resources lines in config/routes.rb. See > http://api.rubyonrails.org/classes/ActionController/Resources.html#M000696 > for more information. >This link is now invalid, I''m 90% sure the correct location is currently in http://api.rubyonrails.org/ under ActionDispatch::Routing::Mapper::Resources (sorry I can''t seem to get the direct link). -- Cedric -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tFvx0FivD6sJ. For more options, visit https://groups.google.com/groups/opt_out.