Class: Governor::ViewManager

Inherits:
Object
  • Object
show all
Defined in:
lib/governor/view_manager.rb

Constant Summary collapse

@@flashes =
{}

Class Method Summary collapse

Class Method Details

.flash(type, path) ⇒ Object

Registers a given partial type at the given path to be displayed a single time.

Example:

Governor::ViewManager.flash(:bottom_of_form, 'articles/single_use')


15
16
17
18
# File 'lib/governor/view_manager.rb', line 15

def flash(type, path)
  @@flashes[type] ||= []
  @@flashes[type] << path
end