Merge pull request #1 from Pickachu/patch-1
Send object a message instead of directly setting the attribute
This commit is contained in:
commit
a6b1bbaf77
|
@ -71,7 +71,7 @@ module SeedFuMongoid
|
|||
|
||||
def seed!
|
||||
data.each do |key, value|
|
||||
document[key] = value
|
||||
document.send :"#{key}=", value
|
||||
end
|
||||
|
||||
puts "#{@klass.name} #{document.attributes}"
|
||||
|
|
Loading…
Reference in New Issue