Module: Template
- Included in:
- Rambo::Controller
- Defined in:
- lib/rambo/controller/template.rb
Constant Summary collapse
- @@template_cache =
{}
Instance Method Summary collapse
- #erb(template, options = {}, locals = {}) ⇒ Object
- #haml(template, options = {}, locals = {}) ⇒ Object
Instance Method Details
#erb(template, options = {}, locals = {}) ⇒ Object
5 6 7 8 |
# File 'lib/rambo/controller/template.rb', line 5 def erb(template, ={}, locals={}) require 'erb' unless defined? ::ERB render :erb, template, , locals end |
#haml(template, options = {}, locals = {}) ⇒ Object
10 11 12 13 |
# File 'lib/rambo/controller/template.rb', line 10 def haml(template, ={}, locals={}) require 'haml' unless defined? ::Haml render :haml, template, , locals end |