Class: Role
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Role
- Defined in:
- app/models/role.rb
Instance Method Summary collapse
Instance Method Details
#list_features ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/role.rb', line 19 def list_features list = .map do |fp| name = I18n.t("admin.features.#{fp.feature.name}") name = fp.feature.name if name.include? 'translation missing' name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end |
#read_only_features ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/models/role.rb', line 9 def read_only_features list = [] .each do |fp| list << fp.feature if fp.read_only end list end |