app/controllers/concerns/bmc/api_controller_concern.rb in bmc-1.5.1 vs app/controllers/concerns/bmc/api_controller_concern.rb in bmc-1.6.0
- old
+ new
@@ -2,15 +2,15 @@
extend ActiveSupport::Concern
private
def render_json(json = {}, options = {})
- json.reverse_merge!(current_user: current_user)
- options.reverse_merge!(current_user: current_user)
+ json.reverse_merge!(current_user:)
+ options.reverse_merge!(current_user:)
json = BMC::MiniModelSerializer::Serialize.call(json, options)
- render options.merge(json: json)
+ render options.merge(json:)
end
def render_json_error(any_object, options = {})
if any_object.is_a?(ActiveModel::Validations)
json = {