activeadmin-selleo-cms 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -72,9 +72,11 @@ module ActiveadminSelleoCms
|
|
72
72
|
class Translation
|
73
73
|
attr_protected :id
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
belongs_to :activeadmin_selleo_cms_page, class_name: '::ActiveadminSelleoCms::Page'
|
76
|
+
|
77
|
+
validates_presence_of :title, unless: ->(translation) { translation.activeadmin_selleo_cms_page.is_link_url }
|
78
|
+
validates_uniqueness_of :slug, scope: :locale, unless: ->(translation) { translation.activeadmin_selleo_cms_page.is_link_url }
|
79
|
+
validates_format_of :slug, with: /^[a-z0-9\-_]+$/i, unless: ->(translation) { translation.activeadmin_selleo_cms_page.is_link_url }
|
78
80
|
end
|
79
81
|
end
|
80
82
|
end
|