Module: Utopia::Controller::Respond::Handlers::JSON
- Defined in:
- lib/utopia/controller/respond.rb
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.call(context, request, media_range, object, **options) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/utopia/controller/respond.rb', line 25 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
21 22 23 |
# File 'lib/utopia/controller/respond.rb', line 21 def self.split(*arguments) APPLICATION_JSON.split(*arguments) end |