activeadmin-selleo-cms 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
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
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
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.16
4
+ version: 0.0.17
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-21 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -395,6 +395,7 @@ 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
398
399
  - app/modules/activeadmin_selleo_cms/content_translation.rb
399
400
  - app/modules/active_admin/views/index_as_list.rb
400
401
  - config/locales/cms.en.yml