osem-fcy/app/views/admin/users/show.html.haml

12 lines
379 B
Text
Raw Normal View History

2014-06-23 19:07:50 +03:00
%table.table
- @show_attributes.each do |attr|
%tr
2014-07-20 19:40:16 +03:00
%td{style: 'width:20%'}
2014-06-23 19:07:50 +03:00
%b
= attr.capitalize.gsub('_', ' ')
2014-07-20 19:40:16 +03:00
- if attr == 'roles'
%td
= @user.send(attr).map { |role| "#{ role.name.capitalize } of #{ role.resource_type.constantize.find(role.resource_id).short_title }"}.join(', ')
- else
%td= @user.send(attr)