Module: Gon::Jbuilder
- Defined in:
- lib/gon/jbuilder.rb
Class Method Summary collapse
Class Method Details
.handler(args, global = false) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gon/jbuilder.rb', line 5 def handler(args, global = false) = args if global && ![:template] raise 'You should provide :template when use rabl with global variables' end controller = Gon::Base.get_controller() @_controller_name = global ? '' : controller.controller_path include_helpers data = parse_jbuilder \ Gon::Base.get_template_path(,'jbuilder'), controller [data, ] end |