I got the following error after executing bundle exec rake db:migrate
/usr/lib/ruby/gems/1.8/gems/ancestry-2.1.0/lib/ancestry/instance_methods.rb:77: syntax error, unexpected ':', expecting ')'
self.class.where(id: (ancestor_ids + ancestor_ids_...
^
/usr/lib/ruby/gems/1.8/gems/ancestry-2.1.0/lib/ancestry/instance_methods.rb:77: syntax error, unexpected ')', expecting kEND
..._ids + ancestor_ids_was).uniq).each do |ancestor|
actual code in instance_methods is
Touch each of this record's ancestors
def touch_ancestors_callback
# Skip this if callbacks are disabled
unless ancestry_callbacks_disabled?
# Only touch if the option is enabled
if self.ancestry_base_class.touch_ancestors
# Touch each of the old *and* new ancestors
self.class.where(id: (ancestor_ids + ancestor_ids_was).uniq).each do |ancestor|
ancestor.without_ancestry_callbacks do
ancestor.touch
end
end
end
end
end
I compared the code with https://github.com/stefankroes/ancestry/blob/master/lib/ancestry/instance_methods.rb#L97 I am not understanding why i am getting that error. Please help me out.
Thank you in advance.