Method: Motr::Controller::Responder#initialize

Defined in:
lib/motr/controller/responder.rb

#initialize(controller, resources, options = {}) ⇒ Responder

Returns a new instance of Responder.



16
17
18
19
20
21
22
# File 'lib/motr/controller/responder.rb', line 16

def initialize(controller, resources, options = {})
  super
  flash = (format == :js) ? controller.flash : controller.flash.now
  [:success, :notice, :error].each do |key|
    flash[key] = options.delete(key) if options[key].present?
  end        
end