Send object a message instead of directly setting the attribute #1
@ -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}"
|
||||||
|
Loading…
Reference in New Issue
Block a user