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!



202
203
204
# File 'app/api/core/service.rb', line 202

def multiple_choices
  status(300)
end

#redirect_to(uuid) ⇒ Object

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



195
196
197
198
# File 'app/api/core/service.rb', line 195

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