Upgraded to rails 3.1.8. Fixed various bugs in wiki.
This commit is contained in:
parent
cd91436f7f
commit
29a6cd8b62
106 changed files with 430 additions and 22436 deletions
|
|
@ -1,8 +1,8 @@
|
|||
class Foodcoop::OrdergroupsController < ApplicationController
|
||||
|
||||
def index
|
||||
@ordergroups = Ordergroup.order(:name.desc)
|
||||
@ordergroups = @ordergroups.where(:name.matches => "%#{params[:query]}%") unless params[:query].blank? # Search by name
|
||||
@ordergroups = Ordergroup.order('name DESC')
|
||||
@ordergroups = @ordergroups.where('name LIKE ?', "%#{params[:query]}%") unless params[:query].blank? # Search by name
|
||||
@ordergroups = @ordergroups.joins(:orders).where(:orders => {:starts.gte => Time.now.months_ago(3)}) if params[:only_active] # Select only active groups
|
||||
|
||||
@total = @ordergroups.size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue