Skip to content

Commit

Permalink
Instantiate an ActiveAdmin::Deprecation instead of simply delegating …
Browse files Browse the repository at this point in the history
…to ActiveSupport. (#51)
  • Loading branch information
varyonic authored Nov 21, 2024
1 parent cc0be7b commit 7754f42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/active_admin/deprecation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ module ActiveAdmin
module Deprecation
module_function

def deprecator # :nodoc:
@deprecator ||= ActiveSupport::Deprecation.new
end

def warn(message, callstack = caller)
ActiveSupport::Deprecation.warn "Active Admin: #{message}", callstack
deprecator.warn "Active Admin: #{message}", callstack
end

end
Expand Down

0 comments on commit 7754f42

Please sign in to comment.