I have an Item class with archive(), remove(), report() and suspend()
methods.
I''m trying to decide how to map controllers and actions to each of
those methods. I can create a separate resource for each method:
resources :items do
resource :archival
resource :removal
resource :report
resource :suspension
end
or simple add some extra verbs on the :items resource
resources :items do
get :archive, :on => :member
get :remove, :on => :member
get :suspend, :on => :member
get :report, :on => :member
post :archive, :on => :member
post :remove, :on => :member
post :suspend, :on => :member
post :report, :on => :member
end
I''m leaning towards the latter because I like the naming convention
more. archive_item_path sounds more intuitive than
new_item_archival_path
I doubt there''s any definitive answer but can anyone offer their
opinions as to the advantages/disadvantages of one approach over
another?
thanks
Alan
--
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
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.