Module: Utopia::Controller::Handlers::JSON
- Defined in:
- lib/utopia/controller/responder.rb
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.call(context, request, media_range, object, **options) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/utopia/controller/responder.rb', line 18 def self.call(context, request, media_range, object, **) if version = media_range.parameters["version"] [:version] = version.to_s end context.succeed! content: object.to_json(), type: APPLICATION_JSON end |
.split(*arguments) ⇒ Object
14 15 16 |
# File 'lib/utopia/controller/responder.rb', line 14 def self.split(*arguments) APPLICATION_JSON.split(*arguments) end |