respond_to do |format|
format.js { render js: "toastr.success('"+successmsg+"')"}
end
If callback-javascript is only 1 line of code or so, then we can avoid creating a new .js.erb file (with name of controller-action) and just include the javascript as above.
format.js { render js: "toastr.success('"+successmsg+"')"}
end
If callback-javascript is only 1 line of code or so, then we can avoid creating a new .js.erb file (with name of controller-action) and just include the javascript as above.
No comments:
Post a Comment