Skip to content

Commit

Permalink
Merge branch 'release/0.11.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Dec 11, 2016
2 parents 206c840 + 8988b2f commit 9675d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scopes/member_scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ module MemberScopes
scope :unavailable, -> { where(state: :unavailable).order('ticket ASC') }
scope :tag_available, -> { where.not(state: :removed).where(member_state: :confirmed) }
scope :without_confessions, -> {
where.not(id: ::ActivityLines::Corporative::Confession.all.map(&:member_id).uniq)
where.not(id: ::ActivityLines::Corporative::Confession.confirmed.map(&:member_id).uniq)
}
scope :cannot_get_confession, -> { where('join_date > ?', DateTime.now - 3.month) }
scope :with_debut, -> { where(id: ::ActivityLines::Corporative::Confession.where(nomination: :debut).map(&:member_id)) }
scope :with_debut, -> { where(id: ::ActivityLines::Corporative::Confession.confirmed.where(nomination: :debut).map(&:member_id)) }
scope :without_debut, -> {
where.not(id: with_debut) + Member.without_confessions - Member.cannot_get_confession
}
Expand Down

0 comments on commit 9675d8a

Please sign in to comment.