On 25 April 2010 18:44, Hassan Schroeder <[email protected]> wrote:
> On Sun, Apr 25, 2010 at 9:40 AM, Colin Law <[email protected]> wrote:
>
>> I believe he has been trying to do that, but is that what he needs to
>> do?  Can he not just set the condition variable in the controller
>> action?  With a parameter on the link calling the action if necessary.
>
> Not according to the examples provided -- there's a link shown to e.g.
> /vendors/new, which would presumably lead to a POST request to a
> `create` action, which would then redirect to a new GET request for
> /vendor/:id `show` - which is where the OP says he wants that value
> available.

You may be right, I did not read as much into the OPs question as you
have.  I assumed that _any_ redirect to show from the create should
include the extra link, rather than specifically a create initiated
from the link you mention.  If my interpretatioin is correct then he
can just specify a parameter in the redirect_to :action => 'show' in
the create action.  If your interpretation is correct (which it may
well be having re-read the original post) then I agree with your
analysis.  I would probably put something in the session for this
case.

Over to you Richard - what is your requirement in this regard.

Colin

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