Class: FrontEndBuilds::BestsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/front_end_builds/bests_controller.rb

Overview

This controller is responsible for serving the index.html based on the incoming params. This is what serves you front end.

Best is not a resource, but we are going to isolate serving the best build to its own controller.

Instance Method Summary collapse

Methods inherited from ApplicationController

#error!, #respond_with_json

Instance Method Details

#showObject



16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/front_end_builds/bests_controller.rb', line 16

def show
  if @front_end
    respond_to do |format|
      format.html { render plain: @front_end.with_head_tag(meta_tags) }
      format.json { render json: { version: @front_end.id } }
    end
  else
    # TODO install instructions, user needs to push build
    render plain: "not found", status: 404
  end
end