Skip to content

Commit

Permalink
sort categories by long_names
Browse files Browse the repository at this point in the history
  • Loading branch information
drapetomaniac committed Nov 12, 2008
1 parent 5d1941b commit 2f2768b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/categories_controller.rb
Expand Up @@ -6,7 +6,7 @@ class CategoriesController < ApplicationController
# GET /categories
# GET /categories.xml
def index
@categories = Category.find(:all)
@categories = Category.find(:all).sort_by { |a| a.long_name }

respond_to do |format|
format.html # index.html.erb
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/people_controller.rb
Expand Up @@ -95,7 +95,7 @@ def verify_email

def edit
@person = Person.find(params[:id])
@all_categories = Category.find(:all, :order => "parent_id, name")
@all_categories = Category.find(:all, :order => "parent_id, name").sort_by { |a| a.long_name }

respond_to do |format|
format.html
Expand Down

0 comments on commit 2f2768b

Please sign in to comment.