activeadmin-selleo-cms 0.0.37 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@ module ActiveadminSelleoCms
|
|
25
25
|
scope :latest, ->(n) { published.reorder("published_at DESC").limit(n) }
|
26
26
|
scope :most_read, ->(n) { published.reorder("views DESC").limit(n) }
|
27
27
|
scope :with_layout, ->(layout_name) { where(layout_name: layout_name) }
|
28
|
-
scope :with_setting_value, ->(key, value) { where("activeadmin_selleo_cms_pages.settings ~ '#{key}:\\s?\\W?#{value}\\W?\\s
|
28
|
+
scope :with_setting_value, ->(key, value) { where("activeadmin_selleo_cms_pages.settings ~ '#{key}:\\s?\\W?#{value}\\W?\\s*'") }
|
29
29
|
scope :with_setting, ->(key) { where("activeadmin_selleo_cms_pages.settings ~ '#{key}:\\s?'") }
|
30
30
|
|
31
31
|
before_validation do
|