Skip to content

Commit

Permalink
Ordering categories by long_name
Browse files Browse the repository at this point in the history
  • Loading branch information
drapetomaniac committed Nov 12, 2008
1 parent 226ce46 commit 2c8d326
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 @@ -99,7 +99,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 2c8d326

Please sign in to comment.