lib/glue/hierarchical.rb in og-0.28.0 vs lib/glue/hierarchical.rb in og-0.29.0

- old
+ new

@@ -10,11 +10,11 @@ # TODO: use active collections. #++ module NestedSets - def self.included_with_params(base, options) + def self.included_with_parameters(base, options) c = { :left => 'lft', :right => 'rgt', :type => Fixnum, :parent => base.to_s.demodulize.underscore.downcase, @@ -98,11 +98,11 @@ child.#{left} = pivot = @#{right} child.#{right} = pivot + 1 @#{right} = pivot + 2 #{base}.transaction do - #{base}.update_property("#{left} = (#{left} + 2)", #{cond_and}"#{left} >= \#{pivot}") - #{base}.update_property("#{right} = (#{right} + 2)", #{cond_and}"#{right} >= \#{pivot}") + #{base}.update("#{left} = (#{left} + 2)", #{cond_and}"#{left} >= \#{pivot}") + #{base}.update("#{right} = (#{right} + 2)", #{cond_and}"#{right} >= \#{pivot}") end self.save child.save end