diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-20 05:58:38 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-20 05:58:38 +0000 |
commit | 9d50075279b55d35b4e6f8bb4c3e61a67a1de17d (patch) | |
tree | 229e62c066787c8a21104eaa4ae32cfdde39c689 /lib | |
parent | fb37d2e4fab887d0abed786541d09eaec0838317 (diff) | |
download | redmine-9d50075279b55d35b4e6f8bb4c3e61a67a1de17d.tar.gz redmine-9d50075279b55d35b4e6f8bb4c3e61a67a1de17d.zip |
Replaces removed `ActiveSupport::Deprecation.warn` with custom deprecators (#41141, #36320).
Patch by Takashi Kato (user:tohosaku).
git-svn-id: https://svn.redmine.org/redmine/trunk@22961 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb | 4 | ||||
-rw-r--r-- | lib/redmine/pagination.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index ac334c19a..6bfc22707 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -61,7 +61,7 @@ module Redmine elsif scope.respond_to?(:call) scope = scope.call else - ActiveSupport::Deprecation.warn "acts_as_activity_provider with implicit :scope option is deprecated. Please pass a scope on the #{self.name} as a proc." + Rails.application.deprecators[:redmine].warn "acts_as_activity_provider with implicit :scope option is deprecated. Please pass a scope on the #{self.name} as a proc." end scope = scope.where("#{provider_options[:timestamp]} >= ?", from) if from @@ -82,7 +82,7 @@ module Redmine elsif respond_to?(:visible) scope = scope.visible(user, options) else - ActiveSupport::Deprecation.warn "acts_as_activity_provider with implicit :permission option is deprecated. Add a visible scope to the #{self.name} model or use explicit :permission option." + Rails.application.deprecators[:redmine].warn "acts_as_activity_provider with implicit :permission option is deprecated. Add a visible scope to the #{self.name} model or use explicit :permission option." scope = scope.where(Project.allowed_to_condition(user, "view_#{self.name.underscore.pluralize}".to_sym, options)) end diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 9857711f5..4ee55165f 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -25,7 +25,7 @@ module Redmine def initialize(*args) if args.first.is_a?(ActionController::Base) args.shift - ActiveSupport::Deprecation.warn "Paginator no longer takes a controller instance as the first argument. Remove it from #new arguments." + Rails.application.deprecators[:redmine].warn "Paginator no longer takes a controller instance as the first argument. Remove it from #new arguments." end item_count, per_page, page, page_param = *args @@ -95,12 +95,12 @@ module Redmine end def items_per_page - ActiveSupport::Deprecation.warn "Paginator#items_per_page will be removed. Use #per_page instead." + Rails.application.deprecators[:redmine].warn "Paginator#items_per_page will be removed. Use #per_page instead." per_page end def current - ActiveSupport::Deprecation.warn "Paginator#current will be removed. Use .offset instead of .current.offset." + Rails.application.deprecators[:redmine].warn "Paginator#current will be removed. Use .offset instead of .current.offset." self end end |