Sha256: 233aa6823c77ba7c8f079804808de83d63582a8f1afc90b056cacda4db20aed4
Contents?: true
Size: 654 Bytes
Versions: 53
Compression:
Stored size: 654 Bytes
Contents
class CreateActiveadminSelleoCmsLocales < ActiveRecord::Migration def up create_table :activeadmin_selleo_cms_locales do |t| t.string :name t.string :code t.boolean :enabled, default: false end add_index :activeadmin_selleo_cms_locales, :name add_index :activeadmin_selleo_cms_locales, :code add_index :activeadmin_selleo_cms_locales, :enabled LanguageList::COMMON_LANGUAGES.each do |lang| ActiveadminSelleoCms::Locale.create({name: lang.name, code: lang.iso_639_1, enabled: ['en'].include?(lang.iso_639_1)}, as: :admin) end end def down drop_table :activeadmin_selleo_cms_locales end end
Version data entries
53 entries across 53 versions & 1 rubygems