20 lines
494 B
Ruby
20 lines
494 B
Ruby
class ApiInstrumentsController < ApplicationController
|
|
|
|
# have to be signed in currently to see this screen
|
|
before_filter :signed_in_user
|
|
|
|
#respond_to :json, :xml
|
|
respond_to :html
|
|
|
|
def index
|
|
@instruments = Instrument.where('instruments.popularity > 0').order('instruments.popularity DESC, instruments.description ASC')
|
|
end
|
|
|
|
def show
|
|
@instrument = Instrument.find(params[:id])
|
|
gon.instrument_id = @instrument.id
|
|
gon.description = @instrument.description
|
|
end
|
|
|
|
end
|