app/controllers/concerns/agilibox/api_controller_concern.rb in agilibox-1.11.0 vs app/controllers/concerns/agilibox/api_controller_concern.rb in agilibox-2.0.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 = Agilibox::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 = {