lib/trust/permissions.rb
def permission_by_member_role
      begin
        m = members_role
        p = member_permissions[m]
        trace 'permission_by_member_role', 0, user: user, member_role: m, permissions: p
        p && authorization(p)
      rescue NoMethodError => e
        if e.message =~ /nil:NilClass/
          raise NoMethodError, e.message + <<-TEXT
          
          Did you forget to declare actions in controller?
          You can do this by declaring one of the follwoing in your controller:
            actions add: {member: :#{action}}
          or
            actions add: {collection: :#{action}}
          TEXT
        else
          raise
        end
      end
    end
# Checks is a member is authorized
# You will need to implement members_role in permissions yourself
Checks is a member is authorized
You will need to implement members_role in permissions yourself
Checks is a member is authorized You will need to implement members_role in permissions yourself
def permission_by_member_role
      begin
        m = members_role
        p = member_permissions[m]
        trace 'permission_by_member_role', 0, user: user, member_role: m, permissions: p
        p && authorization(p)
      rescue NoMethodError => e
        if e.message =~ /nil:NilClass/
          raise NoMethodError, e.message + <<-TEXT
          Did you forget to declare actions in controller?
          You can do this by declaring one of the follwoing in your controller:
            actions add: {member: :#{action}}
          or
            actions add: {collection: :#{action}}
          TEXT
        else
          raise
        end
      end
    end
def permission_by_member_role begin m = members_role p = member_permissions [ m ] trace 'permission_by_member_role' , 0 , user : user , member_role : m , permissions : p p && authorization ( p ) rescue NoMethodError => e if e . message =~ / nil:NilClass / raise NoMethodError , e . message + <<-TEXT 
          
          Did you forget to declare actions in controller?
          You can do this by declaring one of the follwoing in your controller:
            actions add: {member: : #{ action } }
          or
            actions add: {collection: : #{ action } }
           TEXT else raise end end end
Checks is a member is authorized
You will need to implement members_role in permissions yourself
Checks is a member is authorized You will need to implement members_role in permissions yourself