Hi folks, this seems like a really simple Question...but behold :)
Geek name:string
Laser geek_id:integer, power:integer
Geek
has_one :Laser
end
Laser
belongs_to :Geek
end
simple enough, right?
Now I want to create the laser, after a geek gets created, so the new Geek Model looks like this
Geek
has_one :laser
after_create :create_laser
end
This works really nice, but I also like to pass a default value for the power attribute of the laser, so how do I do that?
after_create :create_laser(:power => 5000)
doesn't work :( but it looks nice :)
does anyone have a nice and elegant solution for this?