Class: Decidim::Admin::AssemblyMemberPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
decidim-assemblies/app/presenters/decidim/admin/assembly_member_presenter.rb

Overview

Decorator for assembly members

Instance Method Summary collapse

Instance Method Details

#nameObject


9
10
11
12
13
14
15
# File 'decidim-assemblies/app/presenters/decidim/admin/assembly_member_presenter.rb', line 9

def name
  if user
    "#{user.name} (#{Decidim::UserPresenter.new(user).nickname})"
  else
    full_name
  end
end

#positionObject


17
18
19
20
21
# File 'decidim-assemblies/app/presenters/decidim/admin/assembly_member_presenter.rb', line 17

def position
  return position_other if __getobj__.position == "other"

  I18n.t(__getobj__.position, scope: "decidim.admin.models.assembly_member.positions", default: "")
end