9 lines
310 B
Ruby
9 lines
310 B
Ruby
class MetacodeAssetPathUpdate < ActiveRecord::Migration
|
|
def change
|
|
Metacode.all.each do |metacode|
|
|
if metacode.icon.start_with?("/assets/icons/")
|
|
metacode.update(icon: metacode.icon.gsub(/^\/assets\/icons/, "https://s3.amazonaws.com/metamaps-assets/metacodes"))
|
|
end
|
|
end
|
|
end
|
|
end
|