class Jbuilder::Jpartial::JpartialHandler

Adds the json and jpartial methods to .jbuilder templates

Public Class Methods

call(template) click to toggle source
# File lib/jbuilder/jpartial/railtie.rb, line 11
def self.call(template)
  %{__already_defined = defined?(json); json||=JbuilderTemplate.new(self);
    jpartial||=Jbuilder::Jpartial::Template.new;
    #{template.source}; json.target! unless
    (__already_defined && __already_defined != "method")}
end