Class: RubyMVC::Views::WebContentTableView

Inherits:
WebContentView show all
Defined in:
lib/ruby_mvc/views/web_content_table_view.rb

Overview

This is a WebContentView used to render table model instances as HTML

Direct Known Subclasses

ActiveRecordWebTypeList

Instance Attribute Summary

Attributes inherited from WebContentView

#uri

Attributes inherited from View

#controller

Attributes included from ActionProvider

#actions

Instance Method Summary collapse

Methods inherited from WebContentView

#initialize

Methods inherited from View

#initialize

Methods included from ActionProvider

#action

Methods included from Toolkit::SignalHandler::ClassMethods

#signal, #signals, #valid_signal!, #valid_signal?

Methods included from Toolkit::SignalHandler

#signal_connect, #signal_disconnect, #signal_emit

Constructor Details

This class inherits a constructor from RubyMVC::Views::WebContentView

Instance Method Details

#renderObject



33
34
35
36
37
38
39
40
41
# File 'lib/ruby_mvc/views/web_content_table_view.rb', line 33

def render
  html = ""
  if t = @options[:title]
    html << "<h2>" << t << "</h2>"
  end

  r = @options[:renderer] || Renderers::Html4TableModelRenderer
  html << r.render(@model, @options)
end