lib/ripple/associations/proxy.rb in ripple-1.0.0.beta vs lib/ripple/associations/proxy.rb in ripple-1.0.0.beta2
- old
+ new
@@ -18,11 +18,11 @@
delegate :options, :to => :proxy_reflection
delegate :collection, :to => :klass
def initialize(owner, reflection)
@owner, @reflection = owner, reflection
- Array(reflection.options[:extend]).each { |ext| proxy_extend(ext) }
+ Array.wrap(reflection.options[:extend]).each { |ext| proxy_extend(ext) }
reset
end
def inspect
load_target
@@ -84,10 +84,10 @@
load_target
other === target
end
def loaded_documents
- loaded? ? Array(target) : []
+ loaded? ? Array.wrap(target) : []
end
def has_changed_documents?
loaded_documents.any? { |doc| doc.changed? }
end