Skip to content

Instantly share code, notes, and snippets.

@baopham
Created April 22, 2012 02:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baopham/2440831 to your computer and use it in GitHub Desktop.
Save baopham/2440831 to your computer and use it in GitHub Desktop.
Rails Note

Asset directories

In versions of Rails before 3.0 (including 3.0 itself), static assets lived in the public/ directory, as follows:

public/stylesheets
public/javascripts
public/images

Files in these directories are (even post-3.0) automatically served up via requests to http://example.com/stylesheets, etc.

Starting in Rails 3.1, there are three canonical directories for static assets, each with its own purpose:

app/assets: assets specific to the present application
lib/assets: assets for libraries written by your dev team
vendor/assets: assets from third-party vendors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment