diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 06:34:25 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-30 06:34:25 +0000 |
commit | b2681cca2e38b7465cd94d51dde14e53b724d0d1 (patch) | |
tree | a4be865f8a2e159236acb234505d08408a6e8556 /activerecord/lib/active_record | |
parent | b7d2dae6dcf00b38a1dba8687d6b70d863da915e (diff) | |
download | rails-b2681cca2e38b7465cd94d51dde14e53b724d0d1.tar.gz rails-b2681cca2e38b7465cd94d51dde14e53b724d0d1.tar.bz2 rails-b2681cca2e38b7465cd94d51dde14e53b724d0d1.zip |
acts_as_nested_set: direct_children is sorted correctly. Closes #4761.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/acts/nested_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/acts/nested_set.rb b/activerecord/lib/active_record/acts/nested_set.rb index 09bf1c39af..37d79d5f0c 100644 --- a/activerecord/lib/active_record/acts/nested_set.rb +++ b/activerecord/lib/active_record/acts/nested_set.rb @@ -190,7 +190,7 @@ module ActiveRecord # Returns a set of only this entry's immediate children def direct_children - self.class.base_class.find(:all, :conditions => "#{scope_condition} and #{parent_column} = #{self.id}") + self.class.base_class.find(:all, :conditions => "#{scope_condition} and #{parent_column} = #{self.id}", :order => left_col_name) end # Prunes a branch off of the tree, shifting all of the elements on the right |