On 17 March 2010 16:06, Colin Law <[email protected]> wrote: >> The RESTful way is to have a "dispense_stock" controller - which has >> its own methods. >> >> The cheaty (smelly) way is to put a hidden field in the form or an >> extra querystring parameter with with the value "new" or "dispense", >> and check the params hash for the value. > > Whether this is smelly or not really depends on how similar the two > actions are.
Don't get me wrong - I wasn't saying *don't* use a hidden param - I was suggesting it as a perfectly acceptable option... it's just that I know the REST police will jump on you if you're not careful. To be honest, in lots of situations, the quick, easy (dirty?) way is best *because* it's quick and easy. And you're right; it may be perfectly possible to design the form to use the same, restful action, and please everybody :-) -- 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.

