I am using Rail 3.2.13.
After looking at some posts here, it seems that in order to use ARB in the coffee script, your file needs a However, I still can not seem to work for it. For example, I have the following in the After all the processing, it starts producing: As you can see, the coffee script is processed, but not the ARB. What is happening? In some cases the then in your case it A similar question can be found here .js.coffee extension,
.js.coffee.erb is not (weird).
demo.js.coffee file:
console.log '& lt;% = root_url% & gt;
(function () {console.log ('& lt;% = root_url% Gt; '); $ (function () {});}). Call (this);
.erb extension is required and in some cases it is not . I have found that even when it is necessary to deal with the coffee script files under the asset directory, even when it is contained within the ideas
demo.js.coffee The second problem is that ARB is being evaluated outside the app, you need the following lines:
'& lt;% url = Rail Web Application: Name: application.routes.url_helpers% & gt; Console.log '& lt;% = url.root_path% & gt;
No comments:
Post a Comment