Skip to content

Commit

Permalink
Remove dummy app's configuration for Sprockets 3
Browse files Browse the repository at this point in the history
  • Loading branch information
yasaichi committed Jan 29, 2017
1 parent d9c7c07 commit af13f3b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@ class Application < Rails::Application
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.assets.configure do |env|
major_version = Sprockets::VERSION.split(".").first.to_i

if major_version == 3
env.register_engine ".haml", Grease.apply(Tilt::HamlTemplate), mime_type: "text/html", silence_deprecation: true
elsif major_version >= 4
env.register_mime_type "text/haml", extensions: %w(.haml .html.haml)
env.register_transformer "text/haml", "text/html", Grease.apply(Tilt::HamlTemplate)
end
env.register_mime_type "text/haml", extensions: %w(.haml .html.haml)
env.register_transformer "text/haml", "text/html", Grease.apply(Tilt::HamlTemplate)
end

# NOTE: Enable us to get the template path by ActionController::Base.helpers.asset_path
Expand Down

0 comments on commit af13f3b

Please sign in to comment.