Method: ActionController::Base#handle_mdml
- Defined in:
- lib/base.rb
#handle_mdml(view_class, action = nil) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/base.rb', line 64 def handle_mdml(view_class, action = nil) action ||= self.action_name vc = self.view_class return false unless vc and vc.public_method_defined?(action) view = vc.new view.controller = self add_variables_to_assigns view.load_assigns(@assigns) html = Persia::Element.new 'html' cursor = Persia::Cursor.create_element(html, view) view.send(action, cursor) render_text cursor.to_s end |