lib/sassc/rails/railtie.rb in sassc-rails-0.0.5 vs lib/sassc/rails/railtie.rb in sassc-rails-0.0.6

- old
+ new

@@ -22,10 +22,16 @@ end # Remove the sass middleware if it gets inadvertently enabled by applications. config.after_initialize do |app| app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack) + + if app.assets + # do this after initialize so sass-rails doesn't interfere with us + app.assets.register_engine '.sass', SassC::Rails::SassTemplate + app.assets.register_engine '.scss', SassC::Rails::ScssTemplate + end end initializer :setup_sass, group: :all do |app| # Only emit one kind of syntax because though we have registered two kinds of generators syntax = app.config.sass.preferred_syntax.to_sym @@ -40,12 +46,9 @@ # # Display a stack trace in the css output when in development-like environments. # config.sass.full_exception = app.config.consider_all_requests_local # end if app.assets - app.assets.register_engine '.sass', SassC::Rails::SassTemplate - app.assets.register_engine '.scss', SassC::Rails::ScssTemplate - app.assets.context_class.class_eval do class_attribute :sass_config self.sass_config = app.config.sass end end