Module: Glib::JsonUi::ResponseHelper

Defined in:
app/helpers/glib/json_ui/response_helper.rb

Defined Under Namespace

Classes: Response

Instance Method Summary collapse

Instance Method Details

#json_ui_response(json) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/helpers/glib/json_ui/response_helper.rb', line 4

def json_ui_response(json)
  __json_ui_analytics(json)

  json.onResponse do
    response = Response.new(json, self)
    yield response.action_builder
  end
end

#json_ui_response_with_view(json) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'app/helpers/glib/json_ui/response_helper.rb', line 13

def json_ui_response_with_view(json)
  json.analytics do
    json.disabled true
  end

  json.onResponse do
    response = Glib::JsonUi::PageHelper::Page.new(json, self)
    yield response.action_builder
  end
end