Given the following controller:
def create
if @mymodel.save
format.js
else
format.js { render :js => @mymodel.errors }
end
end
What's the Rails way of handling a .JS error response... Do I create .js file with a different file name just for servering Errors?
Do I add an IF ELSE in the .js file?
thanks