Class: QuickstartsController

Inherits:
BaseController show all
Defined in:
app/controllers/quickstarts_controller.rb

Constant Summary

Constants inherited from BaseController

BaseController::API_VERSION, BaseController::SUPPORTED_API_VERSIONS

Instance Method Summary collapse

Methods included from UserActionLogger

#get_action_logger, #log_action

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/quickstarts_controller.rb', line 5

def index
  render_success(:ok, "quickstarts", quickstarts, "LIST_QUICKSTARTS", "Showing all quickstarts")
end

#showObject



9
10
11
12
13
14
15
16
# File 'app/controllers/quickstarts_controller.rb', line 9

def show
  id = params[:id]
  if quickstart = quickstarts.find{ |obj| obj['quickstart']['id'] == id }
    render_success(:ok, "quickstarts", [quickstart], "SHOW_QUICKSTART",  "Showing quickstart for '#{id}'")
  else
    render_error(:not_found, "Quickstart '#{id}' not found", 118, "SHOW_QUICKSTART")
  end
end