engines/adva_rbac/app/helpers/roles_helper.rb
def add_authorizing_css_classes!(options, action, object)
    action = :"#{action} #{object.class.name.underscore.downcase}"
    roles = object.role_context.expand_roles_for(action)
    options[:class] ||= ''
    options[:class] = options[:class].split(/ /)
    options[:class] << 'visible_for' << roles # roles.map { |role| role_to_css_class(role) }.join(' ')
    options[:class] = options[:class].flatten.uniq.join(' ')
  end
# Adds the css class required-roles as well as a couple of css classes that
# can be matched with the current user's roles in order to toggle the visibility
# of an element
Adds the css class required-roles as well as a couple of css classes that
can be matched with the current user's roles in order to toggle the visibility
of an element
Adds the css class required - roles as well as a couple of css classes that can be matched with the current user ' s roles in order to toggle the visibility of an element
def add_authorizing_css_classes!(options, action, object)
    action = :"#{action} #{object.class.name.underscore.downcase}"
    roles = object.role_context.expand_roles_for(action)
    options[:class] ||= ''
    options[:class] = options[:class].split(/ /)
    options[:class] << 'visible_for' << roles 
    options[:class] = options[:class].flatten.uniq.join(' ')
  end
def add_authorizing_css_classes! ( options , action , object ) action = :" #{ action } #{ object . class . name . underscore . downcase } " roles = object . role_context . expand_roles_for ( action ) options [ :class ] ||= '' options [ :class ] = options [ :class ] . split ( / / ) options [ :class ] << 'visible_for' << roles options [ :class ] = options [ :class ] . flatten . uniq . join ( ' ' ) end
Adds the css class required-roles as well as a couple of css classes that
can be matched with the current user's roles in order to toggle the visibility
of an element
Adds the css class required - roles as well as a couple of css classes that can be matched with the current user ' s roles in order to toggle the visibility of an element
# roles.map { |role| role_to_css_class(role) }.join(' ')
options
action
object