Browse files

order by

  • Loading branch information...
1 parent 912922c commit 419f287674986a80cf3817a56b6c7ec9a7de5283 @mikeki committed Nov 11, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/controllers/exercises_controller.rb
  2. +1 −1 app/views/exercises/index.html.erb
View
2 app/controllers/exercises_controller.rb
@@ -8,7 +8,7 @@ def find_course
# GET /exercises
# GET /exercises.xml
def index
- @exercises = @course.exercises
+ @exercises = @course.exercises.order("similarity_avarage desc")
respond_to do |format|
format.html # index.html.erb
View
2 app/views/exercises/index.html.erb
@@ -12,7 +12,7 @@
<th></th>
</tr>
-<% @exercises.each.order(:) do |exercise| %>
+<% @exercises.each do |exercise| %>
<tr>
<td><%= exercise.name %></td>
<td><%= exercise.description %></td>

0 comments on commit 419f287

Please sign in to comment.