Content blocks for navigation

This commit is contained in:
Ziyan Junaideen
2018-07-23 12:34:15 +05:30
parent b95aa5d912
commit 1c818850d2

View File

@@ -1,5 +1,5 @@
class SiteCustomization::ContentBlock < ActiveRecord::Base
VALID_BLOCKS = %w(top_links footer)
VALID_BLOCKS = %w(top_links footer subnavigation_before subnavigation_after)
validates :locale, presence: true, inclusion: { in: I18n.available_locales.map(&:to_s) }
validates :name, presence: true, uniqueness: { scope: :locale }, inclusion: { in: VALID_BLOCKS }