Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created November 21, 2011 23:14
Show Gist options
  • Save brandon-beacher/1384311 to your computer and use it in GitHub Desktop.
Save brandon-beacher/1384311 to your computer and use it in GitHub Desktop.
if Rails.env.production?
Sass::Plugin.options.merge!(
:template_location => 'public/stylesheets/sass',
:css_location => 'tmp/stylesheets'
)
Rails.configuration.middleware.delete('Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Rack::Static',
:urls => ['/stylesheets'],
:root => "#{Rails.root}/tmp")
end
@seebq
Copy link

seebq commented Nov 21, 2011

magic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment