activeadmin-selleo-cms 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ module PagesHelper
11
11
 
12
12
  def link_to_search_result(result)
13
13
  if result.is_a? ActiveadminSelleoCms::Page
14
- link_to result, page_path(I18n.locale, result)
14
+ link_to result, result.url
15
15
  end
16
16
  end
17
17
 
@@ -33,6 +33,7 @@ module ActiveadminSelleoCms
33
33
  scope :most_read, ->(n) { published.reorder("views DESC").limit(n) }
34
34
  scope :with_layout, ->(layout_name) { where(layout_name: layout_name) }
35
35
  scope :with_setting_value, ->(key, value) { where("activeadmin_selleo_cms_pages.settings ~ '#{key}: #{value}'") }
36
+ scope :with_setting, ->(key) { where("activeadmin_selleo_cms_pages.settings ~ '#{key}: '") }
36
37
 
37
38
  before_validation do
38
39
  self.slug = self.title.parameterize if title and slug.blank?
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
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.17
4
+ version: 0.0.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-28 00:00:00.000000000 Z
12
+ date: 2013-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -395,7 +395,6 @@ files:
395
395
  - app/assets/javascripts/activeadmin-selleo-cms/custom.js
396
396
  - app/assets/javascripts/ckeditor/config.js
397
397
  - app/helpers/pages_helper.rb
398
- - app/modules/i18n/backend/active_record.rb
399
398
  - app/modules/activeadmin_selleo_cms/content_translation.rb
400
399
  - app/modules/active_admin/views/index_as_list.rb
401
400
  - config/locales/cms.en.yml
@@ -1,25 +0,0 @@
1
- require 'i18n/backend/base'
2
- require 'i18n/backend/active_record/translation'
3
-
4
- module I18n
5
- module Backend
6
- class ActiveRecord
7
-
8
- module Implementation
9
- include Base, Flatten
10
-
11
- def store_translations(locale, data, options = {})
12
- escape = options.fetch(:escape, true)
13
- flatten_translations(locale, data, escape, false).each do |key, value|
14
- unless Translation.locale(locale).lookup(key).any?
15
- Translation.create(:locale => locale.to_s, :key => key.to_s, :value => value)
16
- end
17
- end
18
- end
19
-
20
- end
21
-
22
- include Implementation
23
- end
24
- end
25
- end