Class: RubyMVC::Views::ActiveRecordWebModelView

Inherits:
WebModelView show all
Defined in:
lib/ruby_mvc/views/ar_web_model_view.rb

Instance Attribute Summary

Attributes inherited from WebContentView

#uri

Attributes inherited from View

#actions, #controller

Instance Method Summary collapse

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(row, options = {}) ⇒ ActiveRecordWebModelView

Returns a new instance of ActiveRecordWebModelView.



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

def initialize(row, options = {})
  super

  action(:edit, :label => "Edit", :icon => :stock_edit) do
    signal_emit("row-edit", self, row)
  end

#      action(:delete, :label => "Delete", :icon => :stock_delete) do
#        signal_emit("row-delete", self, row)
#      end
end

Instance Method Details

#renderObject



45
46
47
48
49
50
51
# File 'lib/ruby_mvc/views/ar_web_model_view.rb', line 45

def render
  html = super
  tagz {
    tagz.concat html
    tagz.concat render_links
  }
end