I am using an inept workaround in my seed file to add the same data twice.
if Therapy.count == 0 therapies = Therapy.create([ { :name => 'Peritoneal dialysis' }, { :name => 'Haemodialysis' }, { :name => 'Plasma therapy' }, { :name => 'Laparotomy' }, { :name => 'Haemofiltration' } ]) end
I guess this could be changed until next
if Therapy.count == 0 therapies = Therapy.create([ { :name => 'Peritoneal dialysis' }, { :name => 'Haemodialysis' }, { :name => 'Plasma therapy' }, { :name => 'Laparotomy' }, { :name => 'Haemofiltration' } ]) elsif Therapy.count == 4 therapies = Therapy.create([ { :name => 'NEW THERAPY' } ]) end
source share