Class: Irwi::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/irwi/config.rb

Instance Method Summary collapse

Instance Method Details

#add_system_page(action, path) ⇒ Object

Add system page

Parameters:

  • action (String, Symbol)

    controller action

  • path (String)

    path in routes



64
65
66
# File 'lib/irwi/config.rb', line 64

def add_system_page( action, path )
  system_pages[ action.to_s ] = path.to_s
end

#page_attachment_classObject



47
48
49
# File 'lib/irwi/config.rb', line 47

def page_attachment_class
  page_attachment_class_name.constantize
end

#page_classObject



39
40
41
# File 'lib/irwi/config.rb', line 39

def page_class
  page_class_name.constantize
end

#page_version_classObject



43
44
45
# File 'lib/irwi/config.rb', line 43

def page_version_class
  page_version_class_name.constantize
end

#system_pagesObject



55
56
57
58
59
# File 'lib/irwi/config.rb', line 55

def system_pages
  @system_pages ||= {
    'all' => 'all'
  }
end

#user_classObject



51
52
53
# File 'lib/irwi/config.rb', line 51

def user_class
  user_class_name.constantize
end