Class: Decidim::Proposals::AdminLog::ValueTypes::ValuatorRoleUserPresenter

Inherits:
Log::ValueTypes::DefaultPresenter show all
Defined in:
decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/valuator_role_user_presenter.rb

Instance Method Summary collapse

Methods inherited from Log::ValueTypes::DefaultPresenter

#initialize

Constructor Details

This class inherits a constructor from Decidim::Log::ValueTypes::DefaultPresenter

Instance Method Details

#presentObject


8
9
10
11
12
13
14
# File 'decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/valuator_role_user_presenter.rb', line 8

def present
  return unless value

  role = Decidim::Proposals::ValuationAssignment.find_by(valuator_role_id: value).valuator_role
  user = role.user
  user.try(:name)
end