Send object a message instead of directly setting the attribute #1

Merged
Pickachu merged 1 commits from patch-1 into master 2013-08-01 20:59:42 +00:00

View File

@ -71,7 +71,7 @@ module SeedFuMongoid
def seed! def seed!
data.each do |key, value| data.each do |key, value|
document[key] = value document.send :"#{key}=", value
end end
puts "#{@klass.name} #{document.attributes}" puts "#{@klass.name} #{document.attributes}"