Project

General

Profile

« Previous | Next » 

Revision ce2f41f3

Added by Dominic Cleal over 6 years ago

Fixes #20959 - Remove :status option on 'head'

View differences:

app/controllers/application_controller.rb
logger.debug "not found: #{exception}" if exception
respond_to do |format|
format.html { render "common/404", :status => :not_found }
format.any { head :status => :not_found}
format.any { head :not_found}
end
true
end
......
logger.debug "service unavailable: #{exception}" if exception
respond_to do |format|
format.html { render "common/503", :status => :service_unavailable, :locals => { :exception => exception } }
format.any { head :status => :service_unavailable }
format.any { head :service_unavailable }
end
true
end
app/controllers/notification_recipients_controller.rb
logger.debug("updated #{count} notification recipents as seen for group #{params[:group]}")
UINotifications::CacheHandler.new(User.current.id).clear unless count.zero?
head status: (count.zero? ? :not_modified : :ok)
head (count.zero? ? :not_modified : :ok)
end
private
config/as_deprecation_whitelist.yaml
Rails 5.1. To achieve the same use where(conditions).delete_all.
- message: Passing conditions to destroy_all is deprecated and will be removed in
Rails 5.1. To achieve the same use where(conditions).destroy_all.
- message: The :status option on `head` has been deprecated and will be removed in
Rails 5.1. Please pass the status as a separate parameter before the options,
instead.
callstack: app/controllers/application_controller.rb:102:in `block (2 levels) in
not_found'
- message: The :status option on `head` has been deprecated and will be removed in
Rails 5.1. Please pass the status as a separate parameter before the options,
instead.
callstack: app/controllers/notification_recipients_controller.rb:30:in `update_group_as_read'
# http://projects.theforeman.org/issues/7570
- message: You didn't set `secret_key_base`. Read the upgrade documentation to learn
more about this new config option.

Also available in: Unified diff