Module: Refinery::Admin::BaseController

Included in:
Refinery::AdminController
Defined in:
lib/refinery/admin/base_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/refinery/admin/base_controller.rb', line 7

def self.included(base)
  base.layout :layout?

  base.before_filter :require_refinery_users!, :force_ssl!,
                     :authenticate_refinery_user!, :restrict_plugins,
                     :restrict_controller
  base.after_filter :store_location?, :only => [:index] # for redirect_back_or_default

  base.helper_method :searching?, :group_by_date
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/refinery/admin/base_controller.rb', line 18

def admin?
  true # we're in the admin base controller, so always true.
end

#searching?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/refinery/admin/base_controller.rb', line 22

def searching?
  params[:search].present?
end