Richlewis
Richlewis

Reputation: 15384

Rails 3 and CSS

This is just a question to put out there to see what everyone else is doing, I'm sure I could be doing things a little better when it comes to structuring my files within Rails 3.1 app.

At present all my CSS goes into application.css file under stylesheets, and in my application.html.erb files under layouts I have

<%= stylesheet_link_tag "application", media: "all" %>

Is there a more efficient or Rails way of doing this or am I OK to carry on like this.? Just trying to get into the habit of using Rails best practices

All advice appreciated

Upvotes: 0

Views: 83

Answers (1)

p0rter
p0rter

Reputation: 989

there is a good way to structure your css. have a look here (have to scroll a little bit):

3.1.3 Linking to CSS Files with the stylesheet_link_tag

so i assume it's an efficient rails way

Upvotes: 1

Related Questions