Class: ActiveComponent::TemplateHandler
- Includes:
- ActionView::TemplateHandlers::Compilable
- Defined in:
- lib/active_component/template_handler.rb
Instance Method Summary collapse
Instance Method Details
#compile(template) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/active_component/template_handler.rb', line 7 def compile(template) # For Rails < 2.1.0, template is a string # For Rails >= 2.1.0, template is a Template object if template.respond_to? :source # # For Rails >=3.0.0, there is a generic identifier # options[:filename] = template.respond_to?(:identifier) ? template.identifier : template.filename template.source else template end end |