No, it doesn't necessarily need more actions.

Changing the product's price? that's an update
Changing its on-hand quantity? That's an update
Changing it's availability? That's an update.

You may opt to have two controllers for your products... one for the public
pages where the products are displayed and then a different one for product
managemet, or you may instead opt to show different views to your customers
vs your admins.

You also don't *have* to follow the Rails REST pattern if you don't want to,
but it does make things easier once you get the hang of it.  It's important
to remember that while the default Rails REST scaffolding maps a model to a
controller,
* A "resource" can be a controller that exists without a model (Sessions)
* You can have several resources pointing to one model (AvailableProducts,
SaleItems)
* A model doesn't *have* to be backed by a database
* You are allowed to tack on additional methods
   map.resources :producs, :member => {:approve => :put, :reject => :put},
:collection =>{:available => :get}

Hope that helps some.


2009/10/1 Pål Bergström <rails-mailing-l...@andreas-s.net>

>
> I have difficulties to get into restful thinking, so sorry for a
> possibly stupid question.
>
> How do you deal with a product listing which has one interface for admin
> and another for customers? It needs more methods than the ones in rest,
> right?
>
> There must be plenty of similar situations which makes restful design
> less logical.
> --
> 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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to