Class: SitesPageModelMigration

Inherits:
Migration
  • Object
show all
Defined in:
lib/migrations/site/01_sites_page_model.rb

Class Method Summary collapse

Class Method Details

.down(site) ⇒ Object



8
9
10
# File 'lib/migrations/site/01_sites_page_model.rb', line 8

def self.down(site)
  site.sites_pages.destroy
end

.up(site) ⇒ Object



2
3
4
5
6
# File 'lib/migrations/site/01_sites_page_model.rb', line 2

def self.up(site)
  site.record_proxy_pages.create_model :sites_page do |sites_pages|
    sites_pages.record_class_name = 'DevelopmentSitesPage'
  end
end