I am using code like this everywhere. How can I reduce such this code so that my Ruby code looks a lot cleaner?Fabricate(:tl, :when =>Date.yesterday.to_s,:work => 266,:type => fast )Fabricate(:tl, :when =>Date.yesterday.to_s,:work => 100,:type => super_fast )Fabricate(:tl, :when =>Date.yesterday.to_s,:work => 50,:type => ludicrous )Fabricate(:tl, :when =>Date.yesterday.to_s,:work => 900,:type => budget )
Fabricate with work dates
ruby;datetime;ruby on rails
I found that I can use hash({}).each method to dry up the code. It is :{fast=>266, super_fast => 100, ludicrous => 50, budget => 900}.each{ |key, value|  Fabricate(:tl, :when =>Date.yesterday.to_s,:work => value,:type => key )}If there is a better technique, please share it.