Module: Admin

Defined in:
lib/admin.rb

Defined Under Namespace

Modules: BaseHelper, DashboardHelper, ModeratorSessionsHelper, ModeratorsHelper Classes: BaseController, DashboardController, ModeratorSessionsController, ModeratorsController, Tab

Class Method Summary collapse

Class Method Details

.add_tab(options = {}) ⇒ Object



18
19
20
21
22
23
# File 'lib/admin.rb', line 18

def add_tab(options = {})
	name = options.delete(:name)
	path = options.delete(:path)
	req_admin = options.delete(:admin_required)
	tabs << Admin::Tab.new(name,path,req_admin)
end

.rootObject



10
11
12
# File 'lib/admin.rb', line 10

def root
  File.dirname(__FILE__) + '/..'
end

.tabsObject



14
15
16
# File 'lib/admin.rb', line 14

def tabs
  @@tabs ||= []
end

.versionObject



6
7
8
# File 'lib/admin.rb', line 6

def version
  @@version ||= File.read("#{root}/VERSION").strip
end