couch_i18n 0.0.6 → 0.0.7
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.
|
@@ -16,8 +16,7 @@ module CouchI18n
|
|
|
16
16
|
map{|dl| {:name => dl, :offset => [params[:offset], dl].join('.')}}
|
|
17
17
|
else
|
|
18
18
|
@translations = CouchI18n::Translation.all(:page => params[:page], :per_page => 30)
|
|
19
|
-
@available_deeper_offsets = CouchI18n::Translation.get_keys_by_level(0).
|
|
20
|
-
map{|dl| {:name => dl, :offset => dl}}
|
|
19
|
+
@available_deeper_offsets = CouchI18n::Translation.get_keys_by_level(0).map{|dl| {:name => dl, :offset => dl}}
|
|
21
20
|
end
|
|
22
21
|
end
|
|
23
22
|
|
data/lib/couch_i18n/store.rb
CHANGED
|
@@ -7,7 +7,7 @@ module CouchI18n
|
|
|
7
7
|
|
|
8
8
|
# Now the store features
|
|
9
9
|
def []=(key, value, options = {})
|
|
10
|
-
key = key.to_s
|
|
10
|
+
key = key.to_s.gsub('/', '.')
|
|
11
11
|
existing = CouchI18n::Translation.find_by_key(key) rescue nil
|
|
12
12
|
translation = existing || CouchI18n::Translation.new(:key => key)
|
|
13
13
|
translation.value = value
|
|
@@ -16,6 +16,7 @@ module CouchI18n
|
|
|
16
16
|
|
|
17
17
|
# alias for read
|
|
18
18
|
def [](key, options=nil)
|
|
19
|
+
key = key.to_s.gsub('/', '.')
|
|
19
20
|
Rails.cache.fetch(key) do
|
|
20
21
|
old_database_name = get_couchrest_name
|
|
21
22
|
begin
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: couch_i18n
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.7
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Benjamin ter Kuile
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-08-20 00:00:00 +02:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies: []
|
|
16
16
|
|