Module: DisplayFor::Helper

Defined in:
lib/display_for/helper.rb

Instance Method Summary collapse

Instance Method Details

#csv_for(resource_class, collection, html_options = {}, &block) ⇒ Object



15
16
17
# File 'lib/display_for/helper.rb', line 15

def csv_for(resource_class, collection, html_options={}, &block)
  Builder::Csv.new(resource_class, collection, html_options, self, &block).to_s
end

#list_for(resource_class, collection, html_options = {}, &block) ⇒ Object



3
4
5
# File 'lib/display_for/helper.rb', line 3

def list_for(resource_class, collection, html_options={}, &block)
  Builder::List.new(resource_class, collection, html_options, self, &block).to_s
end

#table_for(resource_class, collection, html_options = {}, &block) ⇒ Object



7
8
9
# File 'lib/display_for/helper.rb', line 7

def table_for(resource_class, collection, html_options={}, &block)
  Builder::Table.new(resource_class, collection, html_options, self, &block).to_s
end

#view_for(resource, html_options = {}, &block) ⇒ Object



11
12
13
# File 'lib/display_for/helper.rb', line 11

def view_for(resource, html_options={}, &block)
  Builder::View.new(resource, html_options, self, &block).to_s
end