Method: Impression::Resource#json_response
- Defined in:
- lib/impression/resource.rb
#json_response(object, **headers) ⇒ Object
Returns a callable that responds with JSON using the given parameters.
178 179 180 |
# File 'lib/impression/resource.rb', line 178 def json_response(object, **headers) ->(req) { req.respond_json(object, **headers) } end |