Fix spec
This commit is contained in:
parent
b9c7e09a4e
commit
73a1be0d57
|
@ -21,8 +21,8 @@ module DateGroupable extend ActiveSupport::Concern
|
||||||
end
|
end
|
||||||
|
|
||||||
def group_by_unit(aggregation_unit, column)
|
def group_by_unit(aggregation_unit, column)
|
||||||
group("date_trunc('#{aggregation_unit}', #{column})")
|
group("date_trunc('#{aggregation_unit}', #{column})::DATE")
|
||||||
.order("date_trunc('#{aggregation_unit}', #{column})")
|
.order("date_trunc('#{aggregation_unit}', #{column})::DATE")
|
||||||
end
|
end
|
||||||
|
|
||||||
def smart_group_by_date(column, start_date, end_date)
|
def smart_group_by_date(column, start_date, end_date)
|
||||||
|
|
Loading…
Reference in New Issue