Methods

Gon::Jbuilder

Public Class Methods

handler(args, global = false) click to toggle source
# File lib/gon/jbuilder.rb, line 5
def handler(args, global = false)
  options = parse_options_from args
  if global && !options[:template]
    raise 'You should provide :template when use rabl with global variables'
  end
  controller = Gon::Base.get_controller(options)
  @_controller_name = global ? '' : controller.controller_path

  include_helpers

  data = parse_jbuilder            Gon::Base.get_template_path(options, 'jbuilder'),
    controller,
    options[:locals]

  [data, options]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.