Ruby on Rails
Sunday, July 10, 2016
The default setting in my application.html.erb is:
I have a cusom.css.scss file in app/assets/stylesheets which is included as part of the
Would rails automatically load this file or am I expected to explicitly tell rails to load it?
What confuses me is that in the Ruby on Rails tutorial, when jQuery is used, it is put inside the html.erb document, like in Chapter 13, so that on the one hand it is used a custom.css.scss file as stylesheet, on the other hand, when javascript is required, it is inserted inside the html.erb document.
-- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'true' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'true' %>
I have a cusom.css.scss file in app/assets/stylesheets which is included as part of the
application.css
file included in the site layout, supposedly because of the stylesheet_link_tag 'application' line of code.
I therefore planned to put all the javascript (jQuery and bootstrap) for my application in custom.js inside app/assets/javascript.Would rails automatically load this file or am I expected to explicitly tell rails to load it?
What confuses me is that in the Ruby on Rails tutorial, when jQuery is used, it is put inside the html.erb document, like in Chapter 13, so that on the one hand it is used a custom.css.scss file as stylesheet, on the other hand, when javascript is required, it is inserted inside the html.erb document.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/18b8f034-eff8-498e-9e60-a3880094bf9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment