aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/acts/nested_set.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-26 11:25:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-26 11:25:32 +0000
commit3dfa56ccfbdcaeba74273ace80cb752e6b716f87 (patch)
tree7d7dc552165c0626a07c1d1d723344381703b1c5 /activerecord/lib/active_record/acts/nested_set.rb
parentee4c834ed2339eaff5dc888e2148a15b9cdbd615 (diff)
downloadrails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.tar.gz
rails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.tar.bz2
rails-3dfa56ccfbdcaeba74273ace80cb752e6b716f87.zip
Updated all references to the old find_first and find_all to use the new style #1511 [Marcel Molina]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/acts/nested_set.rb')
-rw-r--r--activerecord/lib/active_record/acts/nested_set.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/acts/nested_set.rb b/activerecord/lib/active_record/acts/nested_set.rb
index 0202ac65b4..cc120cad4b 100644
--- a/activerecord/lib/active_record/acts/nested_set.rb
+++ b/activerecord/lib/active_record/acts/nested_set.rb
@@ -181,17 +181,17 @@ module ActiveRecord
# Returns a set of itself and all of it's nested children
def full_set
- self.class.find_all( "#{scope_condition} AND (#{left_col_name} BETWEEN #{self[left_col_name]} and #{self[right_col_name]})" )
+ self.class.find(:all, :conditions => "#{scope_condition} AND (#{left_col_name} BETWEEN #{self[left_col_name]} and #{self[right_col_name]})" )
end
# Returns a set of all of it's children and nested children
def all_children
- self.class.find_all( "#{scope_condition} AND (#{left_col_name} > #{self[left_col_name]}) and (#{right_col_name} < #{self[right_col_name]})" )
+ self.class.find(:all, :conditions => "#{scope_condition} AND (#{left_col_name} > #{self[left_col_name]}) and (#{right_col_name} < #{self[right_col_name]})" )
end
# Returns a set of only this entries immediate children
def direct_children
- self.class.find_all( "#{scope_condition} and #{parent_column} = #{self.id}")
+ self.class.find(:all, :conditions => "#{scope_condition} and #{parent_column} = #{self.id}")
end
# Prunes a branch off of the tree, shifting all of the elements on the right
@@ -209,4 +209,4 @@ module ActiveRecord
end
end
end
-end \ No newline at end of file
+end