Permalink
Browse files

Improve a order tune list by id when selecting tuning.

  • Loading branch information...
1 parent 7feb680 commit 883e7ea0e11e72f98689f184e3e5ccbdd0e9c7d6 @volpe28v committed Apr 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/tune.rb
View
@@ -6,7 +6,7 @@ class Tune < ActiveRecord::Base
def self.all_or_filter_by_tuning(tuning)
return self.all if Tuning.find_by_name(tuning) == nil
- self.includes(:tuning).where("tunings.name = ?", tuning )
+ self.includes(:tuning).where("tunings.name = ?", tuning ).order("id ASC")
end
scope :doing , includes(:progresses).where("progresses.percent > 0 and progresses.percent < 100")

0 comments on commit 883e7ea

Please sign in to comment.