Class: Volt::NoticesController

Inherits:
ModelController show all
Defined in:
app/volt/controllers/notices_controller.rb

Instance Attribute Summary

Attributes inherited from ModelController

#attrs, #section

Instance Method Summary collapse

Methods inherited from ModelController

#container, #controller, #dom_nodes, #first_element, #go, #initialize, #loaded?, #method_missing, model, #model, #model=, new, #raw, #redirect_to, #require_login, #respond_to?, #trigger, #u, #yield_html

Methods included from CollectionHelpers

#channel, #cookies, #flash, #local_store, #page, #params, #store, #tasks, #url, #url_for, #url_with

Methods included from LifecycleCallbacks

included, #run_callbacks, #stop_chain

Methods included from ReactiveAccessors

#__reactive_dependency_get, included

Constructor Details

This class inherits a constructor from Volt::ModelController

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Volt::ModelController

Instance Method Details

#heyObject



5
6
7
# File 'app/volt/controllers/notices_controller.rb', line 5

def hey
  'yep'
end

#map_key_class(key) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/volt/controllers/notices_controller.rb', line 9

def map_key_class(key)
  case key
  when 'errors'
    'danger'
  when 'warnings'
    'warning'
  when 'successes'
    'success'
  else
    # notices
    'info'
  end
end