leaf? method given me exception:
TypeError: nil can't be coerced into Fixnum
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/associations/collection_association.rb:319:in `+'
I have the same error with this:
model.association.children.size.zero?
Can we change implementation of leaf?
method from:
def leaf?
children.size.zero?
end
to:
def leaf?
children.blank?
end
?
Video: https://youtu.be/hutkAa39JcU
leaf?method given me exception:I have the same error with this:
model.association.children.size.zero?Can we change implementation of
leaf?acts_as_tree/lib/acts_as_tree.rb
Line 352 in 4fa8980
method from:
to:
?
Video: https://youtu.be/hutkAa39JcU