Class: CouponRedemptionPageModelMigration
- Inherits:
-
Migration
- Object
- Migration
- CouponRedemptionPageModelMigration
- Defined in:
- lib/migrations/07_shop_coupon_redemption_page_model.rb
Class Method Summary collapse
Class Method Details
.down(site) ⇒ Object
9 10 11 |
# File 'lib/migrations/07_shop_coupon_redemption_page_model.rb', line 9 def self.down(site) site.coupon_redemption_pages.destroy end |
.up(site) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/migrations/07_shop_coupon_redemption_page_model.rb', line 2 def self.up(site) site.pages.create_model :coupon_redemption_pages do |coupon_redemption_pages| add_one :redirect_to, model: :page coupon_redemption_pages.record_class_name = 'CouponRedemptionPage' end end |