Skip to content

Commit

Permalink
Style/RedundantDoubleSplatHashBraces
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Jul 13, 2024
1 parent a5fe87a commit a2732ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ Style/FrozenStringLiteralComment:
- 'test/models.rb'
- 'test/schema.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantDoubleSplatHashBraces:
Exclude:
- 'lib/commentable_methods.rb'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Expand Down
4 changes: 2 additions & 2 deletions lib/commentable_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ def acts_as_commentable(*args)
self.comment_types = (comment_roles.blank? ? [:comments] : comment_roles)

if comment_roles.blank?
has_many :comments, **{ as: :commentable, dependent: :destroy }.merge(join_options)
has_many :comments, as: :commentable, dependent: :destroy, **join_options
else
comment_roles.each do |role|
define_role_based_inflection(role)
end
has_many :all_comments, **{ as: :commentable, dependent: :destroy, class_name: 'Comment' }.merge(join_options)
has_many :all_comments, as: :commentable, dependent: :destroy, class_name: 'Comment', **join_options
end

comment_types.each do |role|
Expand Down

0 comments on commit a2732ba

Please sign in to comment.