Module: RolesHelper

Defined in:
app/helpers/roles_helper.rb

Instance Method Summary (collapse)

Instance Method Details



12
13
14
15
# File 'app/helpers/roles_helper.rb', line 12

def role_link(role)
  return nil if role.nil?
  link_to(role_tag(role).html_safe, metamorphosize_if(role.role_object))
end

- (Object) role_tag(role)



7
8
9
10
# File 'app/helpers/roles_helper.rb', line 7

def role_tag(role)
  return nil if role.nil?
  [person_tag(role.person), "[#{role.class.human_name}]"].join(' ').html_safe
end

- (Object) roles_names(roles)



3
4
5
# File 'app/helpers/roles_helper.rb', line 3

def roles_names(roles)
  people_names(roles.collect{|p| p.person}) 
end