Reputation: 619
I am using Ruby on Rails 3.0.0 and I want to load CSS stylesheet file form public/stylesheet.
Upvotes: 1
Views: 457
Reputation: 9392
For versions greater that 3.0.0 go to app/views/layouts/application.html.[erb/haml or whatever] and add the line
= stylesheet_link_tag 'application'
under your head tag. This way you can link your page to the stylesheet at app/assets/stylesheets/application.css. You can choose your desired file name instead of "application". But for versions upto 3.0.0(included) the above code will link the css file at public/stylesheets/application.css. Check this out
Upvotes: 1