Use mongoid write_attribute method instead of attribute= method to support dynamic fields #2

Merged
pblesi merged 2 commits from master into master 2014-06-06 14:50:11 +00:00
Showing only changes of commit 09b470a81d - Show all commits

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}"