Skip to content

Commit

Permalink
Mets à jour la syntaxe pour Rails 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shanser authored and cprodhomme committed Jun 4, 2021
1 parent 4646d20 commit 9f15fda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/structure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class Structure < ApplicationRecord

scope :non_activees, -> { par_nombre_d_evaluations 'BETWEEN 1 AND 3' }
scope :activees, -> { par_nombre_d_evaluations '> 3' }
scope :actives, -> { activees.par_derniere_evaluation('> ?', 2.months.ago) }
scope :actives, -> { activees.par_derniere_evaluation('> ?', 2.months.ago).uniq!(:group) }
scope :inactives, lambda {
activees.par_derniere_evaluation('BETWEEN ? AND ?', 6.months.ago, 2.months.ago)
activees.par_derniere_evaluation('BETWEEN ? AND ?', 6.months.ago, 2.months.ago).uniq!(:group)
}
scope :abandonnistes, -> { activees.par_derniere_evaluation('< ?', 6.months.ago) }
scope :abandonnistes, -> { activees.par_derniere_evaluation('< ?', 6.months.ago).uniq!(:group) }

def display_name
nom
Expand Down

0 comments on commit 9f15fda

Please sign in to comment.