app/models/effective/page.rb in effective_pages-3.0.6 vs app/models/effective/page.rb in effective_pages-3.0.7
- old
+ new
@@ -57,11 +57,10 @@
validates :meta_description, presence: true, length: { maximum: 150 }
validates :layout, presence: true
validates :template, presence: true
- validates :menu_name, if: -> { menu? && EffectivePages.menus.present? },
- presence: true, inclusion: { in: EffectivePages.menus.map(&:to_s) }
+ validates :menu_name, if: -> { menu? && EffectivePages.menus.present? }, presence: true
# validates :menu_position, if: -> { menu? },
# presence: true, uniqueness: { scope: [:menu_name, :menu_parent_id] }
scope :deep, -> { includes(:menu_parent, menu_children: :menu_parent) }