I have a resource named ''users'' and another one
''posts'', but these one
can have ''offers'' or ''requests''..
shouild I define 2 other resources or keep only one, using something
like :
map.resources :users, :collection => { :offer => :get }
map.resources :users, :collection => { :request => :get }
which will give me helper methods like :
offer_users_url #=> "/users;offer"
request_users_url #=> "/users;request"
and adding my own prefix to the generated url name:
map.resources :users, :collection => { :offer => :get }, :name_prefix
=>
''my_''
map.resources :users, :collection => { :request => :get }, :name_prefix
=> ''my_''
giving
my_offer_users_url #=> "/users;offer"
my_offer_users_url #=> "/users;offer"
what is the best design ? one or 2 resources ...
--
Posted via 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
groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---