Class: Sonic::ResultsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/sonic/results_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
10
11
12
# File 'app/controllers/sonic/results_controller.rb', line 4

def index
  json = File.read('public/sonic/results.json')
  @results = JSON.parse(json)

  respond_to do |format|
    format.html # index.html.erb
    format.json  { render :json => json }
  end
end