Module: Tablette::ActionViewHelper

Defined in:
lib/tablette/action_view.rb

Instance Method Summary collapse

Instance Method Details

#tablette_for(objects, options = {}, &block) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/tablette/action_view.rb', line 21

def tablette_for(objects, options = {}, &block)
  default_options = {
    :renderer => ActionViewRenderer.new(self),
    :helper   => self
  }

  table = Tablette::Table.new(options.merge(default_options), &block)
  table.to_html(objects)
end