Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@ -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})
|
||||
)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user