Class: RubyMVC::Views::ActiveRecordWebTypeList

Inherits:
WebContentTableView show all
Defined in:
lib/ruby_mvc/views/ar_web_type_list.rb

Instance Attribute Summary

Attributes inherited from WebContentView

#uri

Attributes inherited from View

#actions, #controller

Instance Method Summary collapse

Methods inherited from WebContentTableView

#render

Methods inherited from WebContentView

#render

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

#initialize(entity_type, options = {}, &block) ⇒ ActiveRecordWebTypeList

Returns a new instance of ActiveRecordWebTypeList.



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ruby_mvc/views/ar_web_type_list.rb', line 30

def initialize(entity_type, options = {}, &block)
  @model = Models::ActiveRecordTableModel.new(entity_type)
  if options.is_a? Hash
    @template = options[:template]
  else
    @template = options
    options = {}
  end
  super((@template ? @template.apply(@model) : @model), options)
  action(:edit, :label => "Edit", :icon => :stock_edit, &block)
end