Method: Pageflow::AccountMemberQuery::Scope#with_role_at_least

Defined in:
app/models/pageflow/account_member_query.rb

#with_role_at_least(role) ⇒ ActiveRecord::Relation<User>

Scope to those members from scope on account who have at least role

Parameters:

  • role (String)

    Required. Minimum role that we compare against.

Returns:

  • (ActiveRecord::Relation<User>)


31
32
33
34
# File 'app/models/pageflow/account_member_query.rb', line 31

def with_role_at_least(role)
  scope.joins((role))
       .where(membership_is_present)
end