Skip to content

Commit

Permalink
Sort models and builds by when they were created.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmooney committed Aug 10, 2016
1 parent 38dcca2 commit 3af6d0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/models_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def overview

models_by_type = @models.group_by(&:subclass_name)
statuses = ModelStatusQuery.new( @models.pluck(:genome_model_id) ).execute
@table_items = @models.page(params[:page])
@table_items = @models.order(:creation_date).page(params[:page])

model_status_hash = @table_items.each_with_object({}) do |item, hash|
hash[item.id] = { model: item }
Expand All @@ -26,7 +26,7 @@ def overview

def status
@model = Model.with_statuses_scope.where(genome_model_id: params[:id]).first!
builds = @model.builds
builds = @model.builds.order(:created_at)

@analysis_project = @model.analysis_projects.first

Expand Down

0 comments on commit 3af6d0c

Please sign in to comment.