rework users page, add role assignment
This commit is contained in:
parent
9998e00ae3
commit
80d48ed7d8
13 changed files with 118 additions and 72 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue