Class: View
- Inherits:
-
Object
- Object
- View
- Defined in:
- lib/rails_view.rb,
lib/rails_view/_lib.rb
Constant Summary collapse
- VERSION =
'3.1.0'
Class Method Summary collapse
Class Method Details
.controller(&block) ⇒ Object
19 20 21 22 |
# File 'lib/rails_view.rb', line 19 def View.controller(&block) controller = ::Current.controller ? ::Current.controller.dup : ::Current.mock_controller block ? controller.instance_eval(&block) : controller end |
.dependencies ⇒ Object
8 9 10 11 12 |
# File 'lib/rails_view/_lib.rb', line 8 def View.dependencies { 'rails_current' => [ 'rails_current' , '~> 2' ] } end |
.render(*args) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rails_view.rb', line 24 def View.render(*args) = args.. args.push() unless .has_key?(:layout) [:layout] = false end Array(View.controller{ render(*args) }).join.html_safe end |