On 17 March 2010 15:41, Clay H. <[email protected]> wrote:
> How do I either:
> 1) Detect which action/view/template sent the user to the create
> action, so that I can conditionally return them to the proper action
> using render?
>
> or
>
> 2) Use redirect_to(:back) and still show the validation errors?
>

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.

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