Module: JsClientBridge::Responses::Ok
- Included in:
- JsClientBridge::Responses
- Defined in:
- lib/js-client-bridge/responses/ok.rb
Instance Method Summary collapse
-
#render_ok(*args) ⇒ String
Generates a ‘ok’ status response.
-
#respond_with_ok(*args) ⇒ Hash
Generates a ‘ok’ status response as a Hash.
Instance Method Details
#render_ok(*args) ⇒ String
Generates a ‘ok’ status response. If the first parameter is a string is will be used as the _status options. It will also honour custom optionss as long they don’t clash with the standard ones.
32 33 34 |
# File 'lib/js-client-bridge/responses/ok.rb', line 32 def render_ok(*args) format_response(*respond_with('ok', args)) end |
#respond_with_ok(*args) ⇒ Hash
Generates a ‘ok’ status response as a Hash. If the first parameter is a string is will be used as the _status options. It will also honour custom optionss as long they don’t clash with the standard ones.
17 18 19 |
# File 'lib/js-client-bridge/responses/ok.rb', line 17 def respond_with_ok(*args) respond_with('ok', args).first end |