Use mongoid write_attribute method instead of attribute= method in order to support mongoid dynamic field assignment

This commit is contained in:
Patrick Blesi 2014-03-17 21:04:08 -05:00
parent a6b1bbaf77
commit 09b470a81d
1 changed files with 1 additions and 1 deletions

View File

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