lib/rails/auth/error_page/debug_middleware.rb in rails-auth-2.1.4 vs lib/rails/auth/error_page/debug_middleware.rb in rails-auth-2.2.0

- old
+ new

@@ -24,10 +24,10 @@ def initialize(app, acl: nil) raise ArgumentError, "ACL must be a Rails::Auth::ACL" unless acl.is_a?(Rails::Auth::ACL) @app = app @acl = acl - @erb = ERB.new(File.read(File.expand_path("../debug_page.html.erb", __FILE__))).freeze + @erb = ERB.new(File.read(File.expand_path("debug_page.html.erb", __dir__))).freeze end def call(env) @app.call(env) rescue Rails::Auth::NotAuthorizedError