2015-08-17 19:08:03 +00:00
|
|
|
class ApiSubjectsController < ApiController
|
|
|
|
|
|
|
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
|
@subjects = Subject.order(:description)
|
2015-08-28 20:11:52 +00:00
|
|
|
respond_with @subjects
|
2015-08-17 19:08:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def show
|
|
|
|
|
@subject = Subject.find(params[:id])
|
|
|
|
|
gon.subject_id = @subject.id
|
|
|
|
|
gon.description = @subject.description
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|