This rule was added in rubocop 1.79. We were inconsistent about it, so we're adding it to get more consistency.
24 lines
451 B
Ruby
24 lines
451 B
Ruby
class Moderation::Users::IndexComponent < ApplicationComponent
|
|
include Header
|
|
|
|
attr_reader :users
|
|
|
|
def initialize(users)
|
|
@users = users
|
|
end
|
|
|
|
private
|
|
|
|
def title
|
|
t("moderation.users.index.title")
|
|
end
|
|
|
|
def status(user)
|
|
t("admin.activity.show.actions.#{activity_action(user)}")
|
|
end
|
|
|
|
def activity_action(user)
|
|
Activity.where(actionable: user, action: [:hide, :block]).last&.action || "block"
|
|
end
|
|
end
|