Closed rottmanj closed 12 years ago
Nope -- JavaScript files are JavaScript files -- they don't get preprocessed by Ruby.
If you'd like to pass app-specific data for your JavaScript to use, just load it as JSON into your page.
jashkenas,
Something to add to this, when even using js.erb string interpolation still does not work.
For some odd reason, string interpolation is not working from with in my js files.
I have the following bit of javascript. What should happen is that the string #{validate_username_broker_userdesk_accounts_path} should be calculated and the string replaced. How ever this is not working.
This js files is located in public/javascripts/broker/userdesk/accounts/account_user_new.js
This is what my assets.yml looks like
embed_assets: on
javascripts: accounts_user_new: