Class: RecordProxyPageModelMigration
- Inherits:
-
Migration
- Object
- Migration
- RecordProxyPageModelMigration
show all
- Defined in:
- lib/yodel/models/migrations/10_record_proxy_page_model.rb
Class Method Summary
collapse
Methods inherited from Migration
copy_missing_migrations_for_all_sites, copy_missing_migrations_for_site, inherited, run_migrations, run_migrations_for_all_sites
Class Method Details
.down(site) ⇒ Object
14
15
16
|
# File 'lib/yodel/models/migrations/10_record_proxy_page_model.rb', line 14
def self.down(site)
site.record_proxy_pages.destroy
end
|
.up(site) ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/yodel/models/migrations/10_record_proxy_page_model.rb', line 2
def self.up(site)
site.pages.create_model :record_proxy_pages do |record_proxy_pages|
add_one :record_model, model: :model
add_one :after_create_page, model: :page
add_one :after_delete_page, model: :page
add_one :after_update_page, model: :page
add_field :show_record_layout, :string
add_one :show_record_layout_record, model: :layout, display: false
record_proxy_pages.record_class_name = 'RecordProxyPage'
end
end
|