summaryrefslogtreecommitdiff
path: root/app/models/member.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/member.rb b/app/models/member.rb
index f198fbe9056..abe9aee3edf 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -41,9 +41,9 @@ class Member < ActiveRecord::Base
is_external_invite = arel_table[:user_id].eq(nil).and(arel_table[:invite_token].not_eq(nil))
user_is_active = User.arel_table[:state].eq(:active)
- includes(:user).references(:users)
- .where(is_external_invite.or(user_is_active))
- .where(requested_at: nil)
+ includes(:user).references(:users).
+ where(is_external_invite.or(user_is_active)).
+ where(requested_at: nil)
end
scope :invite, -> { where.not(invite_token: nil) }
@@ -99,9 +99,9 @@ class Member < ActiveRecord::Base
users = User.arel_table
members = Member.arel_table
- member_users = members.join(users, Arel::Nodes::OuterJoin)
- .on(members[:user_id].eq(users[:id]))
- .join_sources
+ member_users = members.join(users, Arel::Nodes::OuterJoin).
+ on(members[:user_id].eq(users[:id])).
+ join_sources
joins(member_users)
end