Created
August 5, 2014 11:58
-
-
Save oozzal/8a0ebc18393ea859c33d to your computer and use it in GitHub Desktop.
.js.erb file not executing solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/18936633/rails-update-js-erb-not-executing-javascript | |
# http://stackoverflow.com/questions/3412375/jquery-ajax-haml-js-erb-files-not-firing | |
# IN SHORT: | |
# use the following code in controller: | |
respond_to do |format| | |
format.html | |
format.js {render layout: false} | |
end | |
# notice the "render" part, it says not to load the layout file, which is layouts/application.[haml/html.erb] by default | |
# However, the error is usually due to the use of haml templating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it mean that we can't use haml in our views for that to work?