Skip to content

Commit

Permalink
Autocorrect safe cops
Browse files Browse the repository at this point in the history
One rule was disabled since we don't want to alter already performed
migrations.
  • Loading branch information
Splines committed Apr 15, 2024
1 parent e476bec commit c9c28fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/commontator/comments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def upvote

# PUT /comments/1/downvote
def downvote
security_transgression_unless(@comment.can_be_voted_on_by?(@commontator_user) && \
security_transgression_unless(@comment.can_be_voted_on_by?(@commontator_user) &&
@comment.thread.config.comment_voting.to_sym == :ld)

@comment.downvote_from(@commontator_user)
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/media_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ def edit_or_show_medium_path(medium)
def external_link_description_not_empty(medium)
# Uses link display name if not empty, otherwise falls back to the
# link url itself.
(medium.external_link_description.presence || medium.external_reference_link)
medium.external_link_description.presence || medium.external_reference_link
end
end
2 changes: 1 addition & 1 deletion app/models/referral.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def vtt_time_span

# provide metadata for vtt file
def vtt_properties
link = (item.link.presence || item.medium_link)
link = item.link.presence || item.medium_link
# at the moment, relations between items can be only of the form
# script <-> video, which means that between them there will be at most
# one script, one manuscript and one video
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20201002094500_change_submission_foreign_keys.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# rubocop:disable Rails/
# rubocop:disable Lint/SymbolConversion
class ChangeSubmissionForeignKeys < ActiveRecord::Migration[6.0]
def up
remove_index :user_submission_joins,
Expand Down Expand Up @@ -33,3 +34,4 @@ def id_to_uuid(table_name, relation_name, relation_class)
end
end
# rubocop:enable Rails/
# rubocop:enable Lint/SymbolConversion

0 comments on commit c9c28fa

Please sign in to comment.