Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sass/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Railtie < ::Rails::Railtie

# Remove the sass middleware if it gets inadvertently enabled by applications.
config.after_initialize do |app|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proper fix is to change the middleware stack inside the initialization process. Can you change this block to a initializer?

app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
app.config.app_middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
end

initializer :setup_sass, group: :all do |app|
Expand Down