Class: CreateGoldenSettings
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateGoldenSettings
- Defined in:
- lib/generators/golden/setting/templates/create_golden_settings.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/golden/setting/templates/create_golden_settings.rb', line 2 def change create_table :golden_settings do |t| t.string :group t.string :name, null: false t.text :value t.string :form_options t.references :resource, polymorphic: true t. end add_index :golden_settings, [:group, :name, :resource_id, :resource_type], unique: true, name: 'index_golden_settings_on_group_and_name_and_resource' end |