Changed behaviour of acts_as_paraniod. Finder wrapper removed an replaced by simple named_scope 'without_deleted'.

This commit is contained in:
Benjamin Meichsner 2009-02-11 15:23:59 +01:00
parent cd9636a650
commit 325d47b22f
18 changed files with 218 additions and 136 deletions

View file

@ -11,8 +11,8 @@ class Admin::OrdergroupsController < ApplicationController
# if the search field is used
conditions = "name LIKE '%#{params[:query]}%'" unless params[:query].nil?
@total = Ordergroup.count(:conditions => conditions )
@ordergroups = Ordergroup.paginate(:conditions => conditions, :page => params[:page],
@total = Ordergroup.without_deleted.count(:conditions => conditions )
@ordergroups = Ordergroup.without_deleted.paginate(:conditions => conditions, :page => params[:page],
:per_page => @per_page, :order => 'name')
respond_to do |format|
@ -60,7 +60,7 @@ class Admin::OrdergroupsController < ApplicationController
@ordergroup = Ordergroup.find(params[:id])
@ordergroup.destroy
redirect_to(admin_Ordergroups_url)
redirect_to(admin_ordergroups_url)
end
def memberships