app/models/pageflow/account_role_query.rb
# Return true if there is a membership with at least role for
# user/account
#
# @param [String] role
#   Required. Minimum role that we compare against.
# @return [Boolean]
Return true if there is a membership with at least role for
user/account
Return true if there is a membership with at least role for user / account
def has_at_least_role?(role)
      @user
        .memberships
        .where(role: Roles.at_least(role))
        .where('(entity_id = :account_id AND '\
               "entity_type = 'Pageflow::Account')",
               account_id: @account.id)
        .any?
    end
def has_at_least_role? ( role ) @user . memberships . where ( role : Roles . at_least ( role ) ) . where ( '(entity_id = :account_id AND ' "entity_type = 'Pageflow::Account')" , account_id : @account . id ) . any? end
Return true if there is a membership with at least role for
user/account
Return true if there is a membership with at least role for user / account
None
Boolean
role
role Required. Minimum role that we compare against.
role Required . Minimum role that we compare against .