Module: ActAsJsonapi::Formatter
- Extended by:
- ActiveSupport::Concern
- Included in:
- Controller
- Defined in:
- lib/act_as_jsonapi/formatter.rb
Instance Method Summary collapse
-
#render_json_api(serializable_hash, options = {}) ⇒ Object
Render json response and set content type to ‘application/vnd.api+json’.
Instance Method Details
#render_json_api(serializable_hash, options = {}) ⇒ Object
Render json response and set content type to ‘application/vnd.api+json’
6 7 8 9 10 |
# File 'lib/act_as_jsonapi/formatter.rb', line 6 def render_json_api(serializable_hash, = {}) .merge!(json_api_content_type) args = { json: serializable_hash }.merge() render args end |