Class: Core::Service::Response::Initializer

Inherits:
Object
  • Object
show all
Defined in:
app/api/core/service.rb

Instance Method Summary collapse

Instance Method Details

#multiple_choicesObject

If you want to return multiple records as a kind of “redirect” then this is the method you want to use!


199
200
201
# File 'app/api/core/service.rb', line 199

def multiple_choices
  status(300)
end

#redirect_to(uuid) ⇒ Object

Causes a response that will redirect the client to the specified UUID path.


192
193
194
195
# File 'app/api/core/service.rb', line 192

def redirect_to(uuid)
  status(301)
  headers('Location' => api_path(uuid))
end