On Tue, Feb 14, 2012 at 8:14 PM, Soichi Ishida <[email protected]> wrote:

> Sorry forgot to mention.
>
> When 'save' action succeeds, it throws json data and catches as Ajax.
> like
>
>  <%= form_for script, :remote => true do |f| %>
>
> So, when 'save' succeeds, it has no problem.
>
> Does it have anything to do with the case of failure ?
>
> soichi
>
>
Not really =) I thought you were having trouble with what to show after
save :)

If there's an error you just have to render the 'new' action again.

format.html { render action: "new" }

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