Sha256: 3e1f3d44174cfad5c5b37b7532ff177e69e3de16f1a96108e44a2ee4e83e261e

Contents?: true

Size: 620 Bytes

Versions: 6

Compression:

Stored size: 620 Bytes

Contents

class DisableFileTypes < ActiveRecord::Migration
  def self.up
    if defined? SettingsExtension && Radiant::Config.column_names.include?('description')
      puts "-- Adding Settings Extension descriptions for assets.skip_filetype_validations"

      Radiant::Config.find(:all).each do |c|
       description = case c.key
         when 'assets.skip_filetype_validations'
           'When set to true, disables the filetype validations. Set to false to enable them.'
         else
           c.description
       end
       c.update_attribute :description, description
      end
    end
  end

  def self.down
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
radiant-clipped-extension-1.0.3 db/migrate/20090316132151_disable_file_types.rb
radiant-clipped-extension-1.0.2 db/migrate/20090316132151_disable_file_types.rb
radiant-clipped-extension-1.0.1 db/migrate/20090316132151_disable_file_types.rb
radiant-clipped-extension-1.0.0 db/migrate/20090316132151_disable_file_types.rb
radiant-1.0.0.rc2 vendor/extensions/clipped/db/migrate/20090316132151_disable_file_types.rb
radiant-1.0.0.rc1 vendor/extensions/assets/db/migrate/20090316132151_disable_file_types.rb