Skip to content

Commit

Permalink
fix deprecation messages in rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Jan 8, 2025
1 parent 47632e5 commit 3ac9bb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/active_scaffold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def self.js_framework=(framework)
end
when :prototype then warning += ', convert your app to jQuery, and remove this call'
end
ActiveSupport::Deprecation.warn warning
deprecator.warn warning
@@js_framework = framework
end

Expand Down Expand Up @@ -110,6 +110,10 @@ def self.root
def self.defaults(&block)
ActiveScaffold::Config::Core.configure(&block)
end

def self.deprecator
@deprecator ||= ActiveSupport::Deprecation.new('4.0', 'ActiveScaffold')
end
end
require 'active_scaffold/engine'
require 'ice_nine'
Expand Down
2 changes: 1 addition & 1 deletion lib/active_scaffold/data_structures/action_links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def respond_to_missing?(name, *)
attr_accessor :css_class

def name=(value)
ActiveSupport::Deprecation.warn 'Changing name is deprecated, use css_class to change the class html attribute'
self.css_class = value
end
ActiveScaffold.deprecator.deprecate_methods(self, :name= => :css_class=)

protected

Expand Down

0 comments on commit 3ac9bb5

Please sign in to comment.