On Mon, Sep 10, 2012 at 5:34 AM, Manoj M. <[email protected]> wrote:
> Loganathan S. wrote in post #1075308:
>> Paste your code...
>>
>> Sent from Samsung Mobile.
>
> Hi,
>  here is my code below, @user is saved successfully but not flash
> doesnot works. I have wrote this in userscontroller
>
>
>
>
>     if @user.save
>       flash[:notice] = "Your account has been created."
>       redirect_to signup_url
>     else
>       flash[:notice] = "There was a problem creating you."
>       render :action => :new
>     end

redirect_to signup_url, flash: {
  notice: "Your account has been saved" }

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to