rocket_cms 0.8.0.pre.2 → 0.8.0.pre.3
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a36963df30b2c7a976b876f39fabda448e51e3c
|
|
4
|
+
data.tar.gz: 95c666cd81958f293669ba9fd12c1af03c85f9d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4d20ee38f3f2fa0b1136331920a7ba7b45c8d3bdbef3c14b2925de63d0502bd8325acd1c289ddfc9677f1c2b105610e1fda03fdfc09dbf40bb8bccb84a5805a
|
|
7
|
+
data.tar.gz: 29956ee542baa3507d8a4c99890998b7ebd1ff4f64a2d2dd8c4eaecf7d6815f754b134d1eb5e43f9405ff08b0b6db2c7b8437b45f85ef8ea4e6f021342a2cc3e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -58,6 +58,12 @@ for ActiveRecord:
|
|
|
58
58
|
|
|
59
59
|
generator creates a new RVM gemset, so after cd'ing to app dir, you should run `bundle install` again if you use rvm.
|
|
60
60
|
|
|
61
|
+
### Localization
|
|
62
|
+
|
|
63
|
+
All models included in the gem support localization via either hstore_translate or built-in Mongoid localize: true option.
|
|
64
|
+
|
|
65
|
+
You can get a nice admin UI for editing locales by adding [rails_admin_hstore_translate](https://github.com/glebtv/rails_admin_hstore_translate) or [rails_admin_mongoid_localize_field](https://github.com/sudosu/rails_admin_mongoid_localize_field)
|
|
66
|
+
|
|
61
67
|
### Documentation
|
|
62
68
|
|
|
63
69
|
It's basically Mongoid + Rails Admin + some of our common models and controllers, capistrano config, etc.
|
|
@@ -5,9 +5,9 @@ class RocketCmsCreateNews < ActiveRecord::Migration
|
|
|
5
5
|
t.timestamp :time, null: false
|
|
6
6
|
|
|
7
7
|
if RocketCMS.config.localize
|
|
8
|
-
t.column :name_translations, 'hstore'
|
|
9
|
-
t.column :excerpt_translations, 'hstore'
|
|
10
|
-
t.column :content_translations, 'hstore'
|
|
8
|
+
t.column :name_translations, 'hstore', default: {}
|
|
9
|
+
t.column :excerpt_translations, 'hstore', default: {}
|
|
10
|
+
t.column :content_translations, 'hstore', default: {}
|
|
11
11
|
else
|
|
12
12
|
t.string :name, null: false
|
|
13
13
|
t.text :excerpt
|
|
@@ -20,8 +20,8 @@ class RocketCmsCreatePages < ActiveRecord::Migration
|
|
|
20
20
|
t.integer :depth
|
|
21
21
|
|
|
22
22
|
if RocketCMS.config.localize
|
|
23
|
-
t.column :name_translations, 'hstore'
|
|
24
|
-
t.column :content_translations, 'hstore'
|
|
23
|
+
t.column :name_translations, 'hstore', default: {}
|
|
24
|
+
t.column :content_translations, 'hstore', default: {}
|
|
25
25
|
else
|
|
26
26
|
t.string :name, null: false
|
|
27
27
|
t.text :content
|
data/lib/rocket_cms/migration.rb
CHANGED
|
@@ -4,11 +4,11 @@ module RocketCMS
|
|
|
4
4
|
|
|
5
5
|
def seo_fields(t)
|
|
6
6
|
if RocketCMS.config.localize
|
|
7
|
-
t.column :h1_translations, 'hstore'
|
|
8
|
-
t.column :title_translations, 'hstore'
|
|
9
|
-
t.column :keywords_translations, 'hstore'
|
|
10
|
-
t.column :description_translations, 'hstore'
|
|
11
|
-
t.column :og_title_translations, 'hstore'
|
|
7
|
+
t.column :h1_translations, 'hstore', default: {}
|
|
8
|
+
t.column :title_translations, 'hstore', default: {}
|
|
9
|
+
t.column :keywords_translations, 'hstore', default: {}
|
|
10
|
+
t.column :description_translations, 'hstore', default: {}
|
|
11
|
+
t.column :og_title_translations, 'hstore', default: {}
|
|
12
12
|
else
|
|
13
13
|
t.string :h1
|
|
14
14
|
t.string :title
|
data/lib/rocket_cms/version.rb
CHANGED