I have a rake file that create a lot of items.
namespace :db do
namespace :seed do
desc "items table"
task :items=> :environment do
Item.create(name: "first_name", process: "clean the item #{test} then pack and send to #{location}")
................................................
end
end
end
when i do rake db:seed:items
I am not able to insert this data in the table without substituting the variable. Is there a way to insert this data without variable substitution so that i can substitute the variable later?
Aucun commentaire:
Enregistrer un commentaire