On Tue, Apr 16, 2013 at 7:15 PM, Wins Lin wrote:
> I have such a code in my "create" method:
>
> respond_to do |format|
> if user.save()
> format.html {redirect_to(:action => "show")}
> else
> format.js
> end
> end
>
> So if save() is successful I want full redirect to a different pa
I have such a code in my "create" method:
respond_to do |format|
if user.save()
format.html {redirect_to(:action => "show")}
else
format.js
end
end
So if save() is successful I want full redirect to a different page. If
not successful then no redirect, just show user an ajax message
2 matches
Mail list logo