Module: JsClientBridge::Responses::Error
- Included in:
- JsClientBridge::Responses
- Defined in:
- lib/js-client-bridge/responses/error.rb
Instance Method Summary collapse
-
#render_error(*args) ⇒ Hash
Generates a error response.
-
#respond_with_error(*args) ⇒ Hash
Generates a error response.
Instance Method Details
#render_error(*args) ⇒ Hash
Generates a error 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/error.rb', line 32 def render_error(*args) format_response(*respond_with('error', args)) end |
#respond_with_error(*args) ⇒ Hash
Generates a error 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.
17 18 19 |
# File 'lib/js-client-bridge/responses/error.rb', line 17 def respond_with_error(*args) respond_with('error', args).first end |