Skip to content

Instantly share code, notes, and snippets.

@avand
Created June 10, 2010 22:05
Show Gist options
  • Save avand/433711 to your computer and use it in GitHub Desktop.
Save avand/433711 to your computer and use it in GitHub Desktop.
stylesheets = Dir.glob('public/**/*.css')
html = []
stylesheets.each do |stylesheet|
stylesheet = stylesheet.gsub('public/stylesheets/', '')
if stylesheet =~ /html/
html << stylesheet
else
html << stylesheet # also add to other mimetypes (iphone, etc.) - this is for common styles
end
end
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :html => html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment