Class: CreateCableSettings

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/create_cable_settings.rb

Class Method Summary collapse

Class Method Details

.downObject



22
23
24
# File 'lib/generators/templates/create_cable_settings.rb', line 22

def self.down
  drop_table :cable_settings
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/generators/templates/create_cable_settings.rb', line 2

def self.up
  create_table :cable_settings do |t|
    t.string :site_title
    t.text :keywords
    t.string :analytics
    t.text :closure
    t.text :description
    t.string :contact_email
    t.text :footer_block_1
    t.text :footer_block_2
    t.string :copyright
    t.text :legal

    t.timestamps
    
  end
  Cable::Setting.create(:site_title => Rails.application.class.parent.name.underscore.titleize )
  
end