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 …