Apply Style/SymbolProc rubocop rule
This style is much more concise.
This commit is contained in:
@@ -19,7 +19,7 @@ class NotificationsController < ApplicationController
|
||||
end
|
||||
|
||||
def mark_all_as_read
|
||||
current_user.notifications.unread.each { |notification| notification.mark_as_read }
|
||||
current_user.notifications.unread.each(&:mark_as_read)
|
||||
redirect_to notifications_path
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user