Sha256: a8800c073e005b335fe77c4053e81515e6c66ecd46e292c16d37633b40ad34f3

Contents?: true

Size: 588 Bytes

Versions: 13

Compression:

Stored size: 588 Bytes

Contents

class DefaultSiteOptionsMigration < Migration
  def self.up(site)
    site.options = {
      pages: {
        permalink_character: {
          description: 'When Yodel creates a URL for a page by using the title of the page, there are sometimes characters (such as spaces) that need to be replaced. This character will be used in their place. e.g "About Us" would become "about-us".',
          type: 'String',
          default: '-',
          value: '-'
        }
      },
      icon: nil
    }
    site.save
  end
  
  def self.down(site)
    site.options = {}
    site.save
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/migrations/08_default_site_options.rb
yodel_production_environment-0.0.7 lib/migrations/yodel/08_default_site_options.rb
yodel_development_environment-0.0.7 lib/migrations/yodel/08_default_site_options.rb
yodel_production_environment-0.0.4 lib/migrations/yodel/08_default_site_options.rb
yodel_development_environment-0.0.4 lib/migrations/yodel/08_default_site_options.rb
yodel-0.0.4 lib/yodel/models/migrations/08_default_site_options.rb
yodel-0.0.3 lib/yodel/models/migrations/08_default_site_options.rb
yodel_production_environment-0.0.2 lib/migrations/yodel/08_default_site_options.rb
yodel_development_environment-0.0.2 lib/migrations/yodel/08_default_site_options.rb
yodel-0.0.2 lib/yodel/models/migrations/08_default_site_options.rb
yodel-0.0.1 lib/yodel/models/migrations/08_default_site_options.rb
yodel_development_environment-0.0.1 lib/migrations/yodel/08_default_site_options.rb
yodel_production_environment-0.0.1 lib/migrations/yodel/08_default_site_options.rb