Class: MuckEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/muck_engine.rb,
lib/muck_engine/tasks.rb,
lib/muck_engine/flash_errors.rb

Defined Under Namespace

Modules: FlashErrors Classes: Tasks

Class Method Summary collapse

Class Method Details

.add_muck_admin_css(css_file) ⇒ Object

Add css for the admin UI



60
61
62
# File 'lib/muck_engine.rb', line 60

def self.add_muck_admin_css(css_file)
  muck_admin_css << css_file
end

.add_muck_admin_nav_item(name, path, image = '') ⇒ Object

Add an item to the main admin navigation menu Paramters: name: Name for the link path: Url to link to image: Image for the link



35
36
37
38
39
# File 'lib/muck_engine.rb', line 35

def self.add_muck_admin_nav_item(name, path, image = '')
  muck_admin_nav_items << OpenStruct.new(:name => name,
                                         :path => path,
                                         :image => image)
end

.add_muck_dashboard_item(path, locals = {}) ⇒ Object

Add an item to the admin dashboard path: Path to the partial locals: Hash of values to pass as locals to the partial



49
50
51
52
# File 'lib/muck_engine.rb', line 49

def self.add_muck_dashboard_item(path, locals = {})
  muck_dashboard_items << OpenStruct.new(:path => path,
                                         :locals => locals)
end

.muck_admin_cssObject



55
56
57
# File 'lib/muck_engine.rb', line 55

def self.muck_admin_css
  @@muck_admin_css ||= [] 
end

.muck_admin_nav_itemsObject



26
27
28
# File 'lib/muck_engine.rb', line 26

def self.muck_admin_nav_items
  @@muck_admin_nav_items ||= []
end

.muck_dashboard_itemsObject



42
43
44
# File 'lib/muck_engine.rb', line 42

def self.muck_dashboard_items
  @@muck_dashboard_items ||= []
end