Re: [Rails] Respond with JS on create-success, otherwise respond with HTML

2013-07-02 Thread Mohamed Wael Khobalatte
Any ideas on this? On Tue, Jul 2, 2013 at 3:19 PM, why-el wrote: > Hey fellas, > > Is there a way to selectively respond with a format depending on whether > there were errors creating an object or not? > > My goal is to *have a remote form fall back to the html version of the > 'new' action if

[Rails] Respond with JS on create-success, otherwise respond with HTML

2013-07-02 Thread why-el
Hey fellas, Is there a way to selectively respond with a format depending on whether there were errors creating an object or not? My goal is to *have a remote form fall back to the html version of the 'new' action if there were errors*. In other words, run the create.js.erb if the save succee