lib/curly/template_handler.rb in curly-templates-0.5.0 vs lib/curly/template_handler.rb in curly-templates-0.6.0
- old
+ new
@@ -11,12 +11,12 @@
# template - The ActionView::Template template that should be compiled.
#
# Returns a String containing the Ruby code representing the template.
def self.call(template)
path = template.virtual_path
- presenter_class = Curly::Presenter.presenter_name_for_path(path)
+ presenter_class = Curly::Presenter.presenter_for_path(path)
- source = Curly.compile(template.source)
+ source = Curly.compile(template.source, presenter_class)
template_digest = Digest::MD5.hexdigest(template.source)
# Template is empty, so there's no need to initialize a presenter.
return %("") if template.source.empty?