Class: AdminController

Inherits:
OfficeController show all
Defined in:
app/controllers/admin_controller.rb

Instance Method Summary collapse

Methods inherited from OfficeController

#error

Methods included from OfficeHelper

#best_euros, #current_basket, #current_basket_or_nil, #current_clerk, #date, #euros, #has_ssl?, #markdown, #new_basket, #paginate, #shipping_method

Instance Method Details

#clean_searchObject



16
17
18
19
20
21
22
# File 'app/controllers/admin_controller.rb', line 16

def clean_search
  q = params[:q]
  return unless q
  q.keys.each do |key|
    q.delete(key) if q[key].blank?
  end
end

#require_adminObject



10
11
12
13
14
# File 'app/controllers/admin_controller.rb', line 10

def require_admin
  clerk = current_clerk
  return if clerk and clerk.admin
  redirect_to 
end