Patch #41141 ยป 0001-Replace-deprecated-ActiveSupport-Deprecation.warn-wi.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
| 1869 | 1869 |
def render_if_exist(options = {}, locals = {}, &block)
|
| 1870 | 1870 |
# Remove test_render_if_exist_should_be_render_partial and test_render_if_exist_should_be_render_nil |
| 1871 | 1871 |
# along with this method in Redmine 7.0 |
| 1872 |
ActiveSupport::Deprecation.warn 'ApplicationHelper#render_if_exist is deprecated and will be removed in Redmine 7.0.'
|
|
| 1872 |
REDMINE_DEPRECATION.warn 'ApplicationHelper#render_if_exist is deprecated and will be removed in Redmine 7.0.'
|
|
| 1873 | 1873 | |
| 1874 | 1874 |
if options[:partial] |
| 1875 | 1875 |
if lookup_context.exists?(options[:partial], lookup_context.prefixes, true) |
| config/initializers/deprecation.rb | ||
|---|---|---|
| 1 |
# frozen_string_literal: true |
|
| 2 | ||
| 3 |
REDMINE_DEPRECATION = ActiveSupport::Deprecation.new('7.0', 'Redmine')
|
|
| lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb | ||
|---|---|---|
| 61 | 61 |
elsif scope.respond_to?(:call) |
| 62 | 62 |
scope = scope.call |
| 63 | 63 |
else |
| 64 |
ActiveSupport::Deprecation.warn "acts_as_activity_provider with implicit :scope option is deprecated. Please pass a scope on the #{self.name} as a proc."
|
|
| 64 |
REDMINE_DEPRECATION.warn "acts_as_activity_provider with implicit :scope option is deprecated. Please pass a scope on the #{self.name} as a proc."
|
|
| 65 | 65 |
end |
| 66 | 66 | |
| 67 | 67 |
scope = scope.where("#{provider_options[:timestamp]} >= ?", from) if from
|
| ... | ... | |
| 82 | 82 |
elsif respond_to?(:visible) |
| 83 | 83 |
scope = scope.visible(user, options) |
| 84 | 84 |
else |
| 85 |
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."
|
|
| 85 |
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."
|
|
| 86 | 86 |
scope = scope.where(Project.allowed_to_condition(user, "view_#{self.name.underscore.pluralize}".to_sym, options))
|
| 87 | 87 |
end |
| 88 | 88 | |
| lib/redmine/pagination.rb | ||
|---|---|---|
| 25 | 25 |
def initialize(*args) |
| 26 | 26 |
if args.first.is_a?(ActionController::Base) |
| 27 | 27 |
args.shift |
| 28 |
ActiveSupport::Deprecation.warn "Paginator no longer takes a controller instance as the first argument. Remove it from #new arguments."
|
|
| 28 |
REDMINE_DEPRECATION.warn "Paginator no longer takes a controller instance as the first argument. Remove it from #new arguments."
|
|
| 29 | 29 |
end |
| 30 | 30 |
item_count, per_page, page, page_param = *args |
| 31 | 31 | |
| ... | ... | |
| 95 | 95 |
end |
| 96 | 96 | |
| 97 | 97 |
def items_per_page |
| 98 |
ActiveSupport::Deprecation.warn "Paginator#items_per_page will be removed. Use #per_page instead."
|
|
| 98 |
REDMINE_DEPRECATION.warn "Paginator#items_per_page will be removed. Use #per_page instead."
|
|
| 99 | 99 |
per_page |
| 100 | 100 |
end |
| 101 | 101 | |
| 102 | 102 |
def current |
| 103 |
ActiveSupport::Deprecation.warn "Paginator#current will be removed. Use .offset instead of .current.offset."
|
|
| 103 |
REDMINE_DEPRECATION.warn "Paginator#current will be removed. Use .offset instead of .current.offset."
|
|
| 104 | 104 |
self |
| 105 | 105 |
end |
| 106 | 106 |
end |