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
- validates_presence_of :title
76
- validates_uniqueness_of :slug, scope: :locale #, unless: ->(translation) { translation.page.is_link_url }
77
- validates_format_of :slug, with: /^[a-z0-9\-_]+$/i #, unless: ->(translation) { translation.page.is_link_url }
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
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: