Fix rubocop offenses - Requires Ruby 3.1+

This commit is contained in:
Sebastian Serth
2022-11-25 10:53:14 +01:00
parent bdf474e684
commit 574e99eddd
93 changed files with 315 additions and 315 deletions

View File

@ -11,7 +11,7 @@ module CommonBehavior
notice = result if result.present?
end
path = options[:path].try(:call) || @object
respond_with_valid_object(format, notice: notice, path: path, status: :created)
respond_with_valid_object(format, notice:, path:, status: :created)
else
respond_with_invalid_object(format, template: :new)
end
@ -51,7 +51,7 @@ module CommonBehavior
notice = result if result.present?
end
path = options[:path] || @object
respond_with_valid_object(format, notice: notice, path: path, status: :ok)
respond_with_valid_object(format, notice:, path:, status: :ok)
else
respond_with_invalid_object(format, template: :edit)
end