Changeset 9
- Timestamp:
- 08/29/06 16:47:20 (2 years ago)
- Files:
-
- trunk/lib/better_nested_set.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/better_nested_set.rb
r8 r9 137 137 # on creation, set automatically lft and rgt to the end of the tree 138 138 def before_create 139 maxright = self.class.maximum(acts_as_nested_set_options[:right_column], :conditions => acts_as_nested_set_options[:scope]) 139 maxright = self.class.maximum(acts_as_nested_set_options[:right_column], :conditions => acts_as_nested_set_options[:scope]) || 0 140 140 # adds the new node to the right of all existing nodes 141 141 self[acts_as_nested_set_options[:left_column]] = maxright+1
