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 [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