added associations between cards and pages models

This commit is contained in:
Manu
2019-01-12 19:45:37 -05:00
parent 2dd953bdfd
commit 5627d2cf23
2 changed files with 2 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
class SiteCustomization::Page < ActiveRecord::Base
VALID_STATUSES = %w(draft published)
has_many :cards, class_name: 'Widget::Card', foreign_key: 'site_customization_page_id'
translates :title, touch: true
translates :subtitle, touch: true