Class: Erector::Rails::TemplateHandler
- Inherits:
-
Object
- Object
- Erector::Rails::TemplateHandler
- Defined in:
- lib/erector/rails/template_handler.rb
Instance Method Summary collapse
Instance Method Details
#call(template) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/erector/rails/template_handler.rb', line 4 def call(template) require_dependency template.identifier = "views/#{template.identifier =~ %r(views/([^.]*)(\..*)?\.rb) && $1}".camelize is_partial = File.basename(template.identifier) =~ /^_/ <<-SRC Erector::Rails.render(#{}, self, local_assigns, #{!!is_partial}) SRC end |