Hemant Bhargava wrote:
> I also have map.resources for resumes. Now my question is that if i add 
> a new page(lets say create_forward) i need to describe it like this in 
> routes.rb,
> 
> map.resources :resumes,   :collection => { :create_forward }
> 
> and if i add a new page (create_req) then i need to define it in 
> routes.rb as,
> 
> map.resources :resumes,   :collection => { :create_req }
> 

Oh, so each time you want Rails to respond to a new method for either 
the collection, or a member of the collection you have to specify those 
additional methods in your routes.rb file?

Well, yes, that's all part of using restful routing in Rails.  In terms 
of clarity and ease of maintenance, I haven't found a better way.

You could go backwards and use non-restful routing, but that's actually 
more work, or you rely on default routes (yuck) to try and match-up 
routes to controllers, actions and ids.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to