Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (25 sloc) 1.43 KB


Adds asset query strings to assets found in css files.


rails 2: script/plugin install git://
rails 3: rails plugin install git://


Simply install the plugin and css files will be updated to include asset tags for any found assets.

background: url("/images/background.png") repeat-x scroll 0 0 #ffffff;

background: url(/images/background.png?1296473764) repeat-x scroll 0 0 #ffffff;

To modify the plugins behaviour, add an initializer file to config/initializers

  • perform_tagging - Flag to determine if the css files should be modified with asset tags.
    Defaults to tag in production only.
  • css_paths - An array of css stylesheet paths. Defaults to the main stylesheets path.
    Defaults to ["#{Rails.root}/public/stylesheets"]
  • asset_path - The main asset path to be used when looking for assets with absolute file references.
    Defaults to Rails.root.join('public')
  • show_warnings - Set to true to see warnings for assets that can't be found on the filesystem or false to not show the warnings.
    Defaults to showing warnings in dev mode only.

ex. config/initializers/css_tagger_options.rb

CssAssetTaggerOptions.setup do |config|
  config.perform_tagging = true

Copyright (c) 2009-2011 Redline Software Inc., released under the MIT license

Jump to Line
Something went wrong with that request. Please try again.