-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Hello,
class Price
include Mongoid::Document
belongs_to :currency
end
c = Currency.first
p = Price.new :currency => c
is there any reason why
copy = c.dup
generates a query to get the currency? {{p}}already has the currency, why not just pass it to copy and save an extra query?