I have problem: I want to call modal with errors if there are errors in registration or sign in form.
So how to call js from controllers or how I should do this ?
Here is my controller:
def create
@user = User.new(params[:user])
if @user.save
# Handle a successful save.
else
render :js => ('#login').modal('show')
end
end
Something like this, but in right way.