I’m using Rails 3.0. How I can include a CSS that I put in /public/stylesheets into a View file in /app/views/posts?
I’m using Rails 3.0. How I can include a CSS that I put in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Asset pipeline was introduced in Rails 3.1.
In the previous versions (including Rails 3.0.0), you can link to CSS files with
stylesheet_link_tag.Including the above code in the view file includes
public/stylesheets/main.cssfile.More details at http://guides.rubyonrails.org/v3.0.0/layouts_and_rendering.html#linking-to-css-files-with-stylesheet_link_tag