Autocorrect new rubocop offenses
This commit is contained in:
parent
deda3d4273
commit
988b3bf689
24 changed files with 48 additions and 41 deletions
|
|
@ -35,13 +35,13 @@ class Comment < ApplicationRecord
|
|||
# Helper class method to lookup all comments assigned
|
||||
# to all commentable types for a given user.
|
||||
scope :find_comments_by_user, lambda { |user|
|
||||
where(user_id: user.id).order('created_at DESC')
|
||||
where(user_id: user.id).order(created_at: :desc)
|
||||
}
|
||||
|
||||
# Helper class method to look up all comments for
|
||||
# commentable class name and commentable id.
|
||||
scope :find_comments_for_commentable, lambda { |commentable_str, commentable_id|
|
||||
where(commentable_type: commentable_str.to_s, commentable_id: commentable_id).order('created_at DESC')
|
||||
where(commentable_type: commentable_str.to_s, commentable_id: commentable_id).order(created_at: :desc)
|
||||
}
|
||||
|
||||
scope :find_since_last_login, lambda { |user|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue