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

@ -8,7 +8,7 @@ module ActionCableHelper
ActionCable.server.broadcast(
"la_exercises_#{exercise_id}_channel_study_group_#{submission.study_group_id}",
type: :rfc,
id: id,
id:,
html: ApplicationController.render(partial: 'request_for_comments/list_entry',
locals: {request_for_comment: self})
)

View File

@ -53,9 +53,9 @@ module ApplicationHelper
ActionController::Base.helpers.sanitize Kramdown::Document.new(markdown).to_html
end
def row(options = {}, &block)
def row(options = {}, &)
tag.div(class: 'attribute-row row') do
label_column(options[:label]) + value_column(options[:value], &block)
label_column(options[:label]) + value_column(options[:value], &)
end
end

View File

@ -11,7 +11,7 @@ module AuthenticatedUrlHelper
COOKIE_EXPIRATION = 30.seconds
def sign(url, object)
payload = {object_id: object.id, object_type: object.class.name, url: url, exp: TOKEN_EXPIRATION.from_now.to_i}
payload = {object_id: object.id, object_type: object.class.name, url:, exp: TOKEN_EXPIRATION.from_now.to_i}
token = JWT.encode payload, TOKEN_SECRET, TOKEN_ALGORITHM
add_query_parameters(url, {TOKEN_PARAM => token})
@ -58,7 +58,7 @@ module AuthenticatedUrlHelper
def prepare_short_living_cookie(value)
{
value: value,
value:,
expires: COOKIE_EXPIRATION.from_now,
httponly: true,
same_site: :strict,