Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@@ -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
|
||||
|
@@ -16,14 +16,14 @@ module FileConversion
|
||||
path = File.dirname(file['name']).sub(%r{^(?>\./|\.)}, '').presence
|
||||
file_type = all_file_types.detect {|ft| ft.file_extension == extension } || FileType.new(file_extension: extension)
|
||||
CodeOcean::File.new(
|
||||
name: name,
|
||||
path: path,
|
||||
name:,
|
||||
path:,
|
||||
size: file['size'],
|
||||
owner: file['owner'],
|
||||
group: file['group'],
|
||||
permissions: file['permissions'],
|
||||
updated_at: file['modificationTime'],
|
||||
file_type: file_type
|
||||
file_type:
|
||||
)
|
||||
end
|
||||
[augment_files_for_download(files), directories]
|
||||
|
@@ -124,7 +124,7 @@ module RedirectBehavior
|
||||
session: session.to_hash,
|
||||
submission: @submission.inspect,
|
||||
params: params.as_json,
|
||||
current_user: current_user,
|
||||
current_user:,
|
||||
lti_exercise_id: session[:lti_exercise_id],
|
||||
lti_parameters_id: session[:lti_parameters_id]
|
||||
)
|
||||
|
Reference in New Issue
Block a user