lib/ripple/associations/linked.rb in ripple-1.0.0.beta vs lib/ripple/associations/linked.rb in ripple-1.0.0.beta2
- old
+ new
@@ -5,10 +5,10 @@
module Associations
module Linked
def replace(value)
@reflection.verify_type!(value, @owner)
@owner.robject.links -= links
- Array(value).compact.each do |doc|
+ Array.wrap(value).compact.each do |doc|
@owner.robject.links << doc.to_link(@reflection.link_tag)
end
loaded
@keys = nil
@target = value