rework users page, add role assignment

This commit is contained in:
Stella Rouzi 2014-07-20 19:40:16 +03:00
parent 9998e00ae3
commit 80d48ed7d8
13 changed files with 118 additions and 72 deletions

View file

@ -1,7 +1,11 @@
%table.table
- @show_attributes.each do |attr|
%tr
%td
%td{style: 'width:20%'}
%b
= attr.capitalize.gsub('_', ' ')
%td= @user.send(attr)
- 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)