Class: Studies::SamplesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Studies::SamplesController
- Defined in:
- app/controllers/studies/samples_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/studies/samples_controller.rb', line 7 def index @study = Study.find(params[:study_id]) @samples = @study.samples.order(:created_at) respond_to do |format| format.html { @samples = @samples.paginate(page: params[:page], per_page: 384) } format.json { render json: @samples.to_json } format.xml { render xml: @samples.to_xml } end end |