Patch #41141 ยป 0001-Replace-deprecated-ActiveSupport-Deprecation.warn-wi.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
|
def render_if_exist(options = {}, locals = {}, &block)
|
||
|
# Remove test_render_if_exist_should_be_render_partial and test_render_if_exist_should_be_render_nil
|
||
|
# along with this method in Redmine 7.0
|
||
|
ActiveSupport::Deprecation.warn 'ApplicationHelper#render_if_exist is deprecated and will be removed in Redmine 7.0.'
|
||
|
REDMINE_DEPRECATION.warn 'ApplicationHelper#render_if_exist is deprecated and will be removed in Redmine 7.0.'
|
||
|
if options[:partial]
|
||
|
if lookup_context.exists?(options[:partial], lookup_context.prefixes, true)
|
||
| config/initializers/deprecation.rb | ||
|---|---|---|
|
# frozen_string_literal: true
|
||
|
REDMINE_DEPRECATION = ActiveSupport::Deprecation.new('7.0', 'Redmine')
|
||
| lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb | ||
|---|---|---|
|
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."
|
||
|
REDMINE_DEPRECATION.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
|
||
| ... | ... | |
|
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."
|
||
|
REDMINE_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."
|
||
|
scope = scope.where(Project.allowed_to_condition(user, "view_#{self.name.underscore.pluralize}".to_sym, options))
|
||
|
end
|
||
| lib/redmine/pagination.rb | ||
|---|---|---|
|
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."
|
||
|
REDMINE_DEPRECATION.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
|
||
| ... | ... | |
|
end
|
||
|
def items_per_page
|
||
|
ActiveSupport::Deprecation.warn "Paginator#items_per_page will be removed. Use #per_page instead."
|
||
|
REDMINE_DEPRECATION.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."
|
||
|
REDMINE_DEPRECATION.warn "Paginator#current will be removed. Use .offset instead of .current.offset."
|
||
|
self
|
||
|
end
|
||
|
end
|
||