Fix active ordergroup
This commit is contained in:
parent
cdc9e91d26
commit
6d71bd2c2f
2 changed files with 3 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ class Foodcoop::OrdergroupsController < ApplicationController
|
|||
end
|
||||
|
||||
if params[:only_active] # Select only active groups
|
||||
@ordergroups = @ordergroups.joins(:orders).where("orders.starts >= ?", Time.now.months_ago(3)).uniq
|
||||
@ordergroups = @ordergroups.active
|
||||
end
|
||||
|
||||
@ordergroups = @ordergroups.page(params[:page]).per(@per_page)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue