metamaps--metamaps/db/migrate/20151025083043_remove_asset_paths_from_metacodes.rb

9 lines
209 B
Ruby
Raw Normal View History

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