lib/ahoy/engine.rb in ahoy_matey-0.3.2 vs lib/ahoy/engine.rb in ahoy_matey-1.0.0
- old
+ new
@@ -1,9 +1,10 @@
module Ahoy
class Engine < ::Rails::Engine
+
# from https://github.com/evrone/quiet_assets/blob/master/lib/quiet_assets.rb
- initializer "ahoy", after: "sprockets.environment" do |app|
+ initializer "ahoy.middleware", after: "sprockets.environment" do |app|
next unless Ahoy.quiet
# Parse PATH_INFO by assets prefix
AHOY_PREFIX = "/ahoy/"
KEY = "ahoy.old_level"
@@ -22,7 +23,8 @@
end
end
alias_method_chain :call, :quiet_ahoy
end
end
+
end
end