Commit d1105e30 by Tô Ngọc Ánh

rake create slug

parent 9ca3a5e6
Pipeline #820 failed with stages
in 0 seconds
namespace :create_slug do
desc 'Create slug model Location'
task locations: :environment do
Location.all.each do |location|
location.update_attributes(slug: "")
end
end
desc 'Create slug model Industry'
task industries: :environment do
Industry.all.each do |industry|
industry.update_attributes(slug: "")
end
end
desc 'Create slug to all model'
task all: %i[locations industries]
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment