class Erector::Rails::TemplateHandler

Public Instance Methods

call(template) click to toggle source
# File lib/erector/rails/template_handler.rb, line 4
      def call(template)
        require_dependency template.identifier
        widget_class_name = "views/#{template.identifier =~ %r(views/([^.]*)(\..*)?\.rb) && $1}".camelize
        is_partial = File.basename(template.identifier) =~ %r^_/
        "        Erector::Rails.render(#{widget_class_name}, self, local_assigns, #{!!is_partial})
"
      end