rocket_cms 0.8.0.pre.2 → 0.8.0.pre.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f447177c116e18a29e8959262ed8cfa170df3cd5
4
- data.tar.gz: b199d2ba287e1bb4a03bc7aff615ec2d363af23c
3
+ metadata.gz: 6a36963df30b2c7a976b876f39fabda448e51e3c
4
+ data.tar.gz: 95c666cd81958f293669ba9fd12c1af03c85f9d3
5
5
  SHA512:
6
- metadata.gz: 7074ddedbdda79b9a03cd0d776a98efdf6f1e4d3548ab1be8ae8a15130cddd6b733f010cf63011befe19118dc5ad3beee68d2917ca0c4ccef7a167433f2d21d8
7
- data.tar.gz: 92d2feb00c016575583b7a4113f79341a6f29ca41531f3b6e9cbeedc160d04af277d74c26654fe6dede2cb9533189bc0dfd5f41bcf47e1b746ad5fc6c9afb208
6
+ metadata.gz: a4d20ee38f3f2fa0b1136331920a7ba7b45c8d3bdbef3c14b2925de63d0502bd8325acd1c289ddfc9677f1c2b105610e1fda03fdfc09dbf40bb8bccb84a5805a
7
+ data.tar.gz: 29956ee542baa3507d8a4c99890998b7ebd1ff4f64a2d2dd8c4eaecf7d6815f754b134d1eb5e43f9405ff08b0b6db2c7b8437b45f85ef8ea4e6f021342a2cc3e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.8.0.pre.2)
4
+ rocket_cms (0.8.0.pre.3)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.8.0.pre.2"
2
+ VERSION = "0.8.0.pre.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre.2
4
+ version: 0.8.0.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv