Class: Ki::Middleware::AdminInterfaceGenerator

Inherits:
DocGenerator show all
Defined in:
lib/ki/middleware/admin_interface_generator.rb

Instance Method Summary collapse

Methods inherited from DocGenerator

#call

Methods included from BaseMiddleware

#initialize

Methods inherited from HamlCompiler

#call

Instance Method Details

#custom_check(req) ⇒ Object



8
9
10
# File 'lib/ki/middleware/admin_interface_generator.rb', line 8

def custom_check(req)
  req.admin?
end

#custom_view_pathObject



4
5
6
# File 'lib/ki/middleware/admin_interface_generator.rb', line 4

def custom_view_path
  File.join(File.dirname(__FILE__), '..', 'views', 'instadmin.haml')
end