Sha256: f67ebeafa5517a5565139192d7025600843a4bd1a408ccee89a35456b3c4fb2d
Contents?: true
Size: 466 Bytes
Versions: 45
Compression:
Stored size: 466 Bytes
Contents
class RemoveTrailingSlashesInTaxonPermalinks < ActiveRecord::Migration def self.up Taxon.find_each(:conditions => {}) do |t| if t.permalink && t.permalink[-1..-1] == '/' t.update_attribute(:permalink, t.permalink[0...-1]) end end end def self.down Taxon.find_each(:conditions => {}) do |t| if t.permalink && t.permalink[-1..-1] != '/' t.update_attribute(:permalink, t.permalink + '/') end end end end
Version data entries
45 entries across 33 versions & 8 rubygems