fix(Dossier.processed_in_month): recast date to datetime in scope
This commit is contained in:
parent
ab777a790c
commit
ec78340c06
1 changed files with 1 additions and 0 deletions
|
@ -234,6 +234,7 @@ class Dossier < ApplicationRecord
|
||||||
scope :termine, -> { not_archived.state_termine }
|
scope :termine, -> { not_archived.state_termine }
|
||||||
|
|
||||||
scope :processed_in_month, -> (date) do
|
scope :processed_in_month, -> (date) do
|
||||||
|
date = date.to_datetime
|
||||||
state_termine
|
state_termine
|
||||||
.joins(:traitements)
|
.joins(:traitements)
|
||||||
.where(traitements: { processed_at: date.beginning_of_month..date.end_of_month })
|
.where(traitements: { processed_at: date.beginning_of_month..date.end_of_month })
|
||||||
|
|
Loading…
Reference in a new issue