rocket_cms 0.8.11 → 0.8.12

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: 3386b1cef9e0a848c0456da4282b0ba545ed1f2f
4
- data.tar.gz: 3414be471b1c4daac32b3a4b87b41915a4c4439e
3
+ metadata.gz: 1fd8732f4dca229aa75b4f558e0a7297ffc30781
4
+ data.tar.gz: f4e0f081a5a3f0f167fcdb6116542a94a8c6f45d
5
5
  SHA512:
6
- metadata.gz: 265dd0d16235ed1b4a81e95f9c0fcd8bf0b8b5458358c1da4e4a7382f040e85137cb0cf3f96be7dfe0cc7beebb6ffb079c19f2e5a678a6bd37d6a75b05f8f4b0
7
- data.tar.gz: 91328a3a45691b8a6d4cc9cc6a39c6dfc5e612239c37adecc7e1c2d68cd9f5f508759b4dc3afcf2efe66bcbb83be2de65a3176152eb05412e369eb08509c4150
6
+ metadata.gz: 2efbd88cf8074c11838c243ba5fe9296f9147b4301bbb10df5672b5f6f8b640895de686ff41f1ff7ddd3bb5c9ecb90a1894791353be8256588608920e9936a78
7
+ data.tar.gz: d8cbcd918a9209975f56a92551863d13c975fcc5cf7958d6dd1fe3f8d3916a38f4e0d8d701cb84e333470c27bf0c9e368d443b3c6a0a631858ec8dcc71e0f36d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.8.11)
4
+ rocket_cms (0.8.12)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -63,7 +63,7 @@ GEM
63
63
  thread_safe (~> 0.3, >= 0.3.4)
64
64
  tzinfo (~> 1.1)
65
65
  addressable (2.3.8)
66
- arel (6.0.2)
66
+ arel (6.0.3)
67
67
  bcrypt (3.1.10)
68
68
  builder (3.2.2)
69
69
  coffee-rails (4.1.0)
@@ -91,7 +91,7 @@ GEM
91
91
  orm_adapter (~> 0.5.0)
92
92
  rails (~> 4.0)
93
93
  glebtv-simple_captcha (0.6.7)
94
- globalid (0.3.5)
94
+ globalid (0.3.6)
95
95
  activesupport (>= 4.1.0)
96
96
  haml (4.0.6)
97
97
  tilt
data/README.md CHANGED
@@ -117,6 +117,12 @@ or
117
117
  gem 'hstore_translate'
118
118
  ```
119
119
 
120
+ Add ```rails_admin_mongoid_localize_field``` gem if using MongoDB:
121
+
122
+ ```ruby
123
+ gem 'rails_admin_mongoid_localize_field'
124
+ ```
125
+
120
126
  ### Documentation
121
127
 
122
128
  It's basically Mongoid + Rails Admin + some of our common models and controllers, capistrano config, etc.
@@ -13,7 +13,11 @@ module RsLocalizeable
13
13
  end
14
14
  def nav_get_menu_items(type)
15
15
  pages = ::Menu.find(type.to_s).pages.enabled
16
- pages = pages.where(["EXIST(name_translations, ?) = TRUE AND name_translations -> ? != ''", I18n.locale, I18n.locale])
16
+ if RocketCMS.mongoid?
17
+ pages = pages.where(:"name.#{I18n.locale}".exists => true)
18
+ elsif RocketCMS.active_record?
19
+ pages = pages.where(["EXIST(name_translations, ?) = TRUE AND name_translations -> ? != ''", I18n.locale, I18n.locale])
20
+ end
17
21
  pages.sorted.to_a
18
22
  end
19
23
  def nav_get_url(item)
@@ -33,13 +33,16 @@ module RsMenu
33
33
  begin
34
34
  nav_extra_data_before(type, primary)
35
35
  items = nav_get_menu_items(type)
36
- items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }.each do |item|
36
+ items = items.select { |i| i.parent_id.nil? && !i.name.blank? && i.enabled }
37
+ items.each do |item|
37
38
  render_with_subs(items, primary, item)
38
39
  end
39
40
  nav_extra_data_after(type, primary)
40
41
  rescue Exception => exception
41
42
  Rails.logger.error exception.message
42
43
  Rails.logger.error exception.backtrace.join("\n")
44
+ puts exception.message
45
+ puts exception.backtrace.join("\n")
43
46
  capture_exception(exception) if respond_to?(:capture_exception)
44
47
  items
45
48
  end
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.8.11"
2
+ VERSION = "0.8.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.11
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler