Class: Dao::Errors2Html::View
- Inherits:
-
Object
- Object
- Dao::Errors2Html::View
- Defined in:
- lib/dao/errors2html.rb
Class Method Summary collapse
Class Method Details
.controller(&block) ⇒ Object
4 5 6 7 |
# File 'lib/dao/errors2html.rb', line 4 def View.controller(&block) controller = ::Current.controller ? ::Current.controller.dup : ::Current.mock_controller block ? controller.instance_eval(&block) : controller end |
.render(*args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dao/errors2html.rb', line 9 def View.render(*args) = args.. args.push() unless .has_key?(:layout) [:layout] = false end Array(View.controller{ render(*args) }).join.html_safe end |