add db migration to remove asset paths from metacodes

This commit is contained in:
Devin Howard 2015-10-25 16:37:13 +08:00 committed by Connor Turland
parent 29411cf1e5
commit d3080906b1

View file

@ -0,0 +1,8 @@
class RemoveAssetPathsFromMetacodes < ActiveRecord::Migration
def change
Metacode.all.each do |metacode|
metacode.icon = metacode.icon.gsub(/^\/assets\//, '')
metacode.save
end
end
end