2015-10-28 06:24:52 +00:00
|
|
|
class MetacodeAssetPathUpdate < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
Metacode.all.each do |metacode|
|
|
|
|
if metacode.icon.start_with?("/assets/icons/")
|
2015-11-06 09:08:42 +00:00
|
|
|
metacode.update(icon: metacode.icon.gsub(/^\/assets\/icons/, "https://s3.amazonaws.com/metamaps-assets/metacodes"))
|
2015-10-28 06:24:52 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|