Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
EasyRoleRequirementSystem, RoleRequirementSystem, SslRequirement
Defined in:
app/controllers/application.rb

Overview

Filters added to this controller apply to all controllers in the application. Likewise, all the methods added will be available for all controllers.

Direct Known Subclasses

Spree::BaseController

Instance Method Summary collapse

Methods included from EasyRoleRequirementSystem

included

Methods included from EasyRoleRequirementSystem::InstanceMethods

#included

Methods included from RoleRequirementSystem

included

Instance Method Details

#admin_created?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/controllers/application.rb', line 19

def admin_created?
  User.first(:include => :roles, :conditions => ["roles.name = 'admin'"])
end