Class: Garnish::Responder

Inherits:
ActionController::Responder
  • Object
show all
Includes:
Converter
Defined in:
lib/garnish/responder.rb

Instance Method Summary collapse

Methods included from Converter

#convert, #module_exists?

Instance Method Details

#to_htmlObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/garnish/responder.rb', line 4

def to_html
  vars = controller.instance_variables.reject {|x| x.to_s.include?("@_")}

  vars.each do |var|
    record = controller.instance_variable_get(var.to_s)
    convert(record, controller.view_context)
  end

  super
end