Add form fields to set the colours and the sections for the banner
Add migrations to store the information in the database
This commit is contained in:
6
db/migrate/20180109081115_add_settings_to_banners.rb
Normal file
6
db/migrate/20180109081115_add_settings_to_banners.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddSettingsToBanners < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :banners, :background_color, :text
|
||||
add_column :banners, :font_color, :text
|
||||
end
|
||||
end
|
||||
9
db/migrate/20180109101656_create_banner_sections.rb
Normal file
9
db/migrate/20180109101656_create_banner_sections.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateBannerSections < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :banner_sections do |t|
|
||||
t.integer :banner_id
|
||||
t.integer :section
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user