rocket_cms 0.8.8 → 0.8.9

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: b1d73217eb904da5fc4407f8b9d8d1e1b1e97f63
4
- data.tar.gz: 0b0a1d58732d72ebb4a37f48655c9814ee273e18
3
+ metadata.gz: 03a571d9cc9684df5c1e787d54adad42d1f54aa4
4
+ data.tar.gz: 1c674ea4a922223cbe544407784edbae5d33ef8a
5
5
  SHA512:
6
- metadata.gz: 6bcd46814f097175ed4ad5cefdb6a22b53810e2e803d82605789245906df4c1f672da3b6bb58949da8b5742c2a8875e6186c73b593dbae4765980d9271ea9a1f
7
- data.tar.gz: c4e6e6171bfc4b65680c1efe508c634c36c7fe62606d44d75e213ef3c2dec7be2283fc84cbbf25b0f9df0d6b683cafb68bf470561151c92bc2cd5e099ab4ba24
6
+ metadata.gz: e323a5c1a761de8984d3f388bb1667195a97ea816c8f38ca2149d83c1e3d33fde26424c7c6b150d5656a453c5c3a1217b667ceef0559b6334d1433daf3b51615
7
+ data.tar.gz: 4b6bf2f253ae5351292eb2c810a05b7e93624d79708e0d1c8bd5004bde2e0d1f007fc43e349c1f6df13aff57c6f55943d08658acd93979736ba12ad2d8941360
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.8.8)
4
+ rocket_cms (0.8.9)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -3,7 +3,7 @@ module Seoable
3
3
  LOCALIZED_FIELDS = [:h1, :title, :keywords, :description, :og_title]
4
4
  FIELDS = LOCALIZED_FIELDS + [:og_image, :robots]
5
5
 
6
- if Seo.table_exists?
6
+ if Seo.separate_table?
7
7
  included do
8
8
  has_one :seo, as: :seoable, autosave: true
9
9
  accepts_nested_attributes_for :seo
data/app/models/seo.rb CHANGED
@@ -8,5 +8,9 @@ class Seo
8
8
  RocketCMS.apply_patches self
9
9
  rails_admin &RocketCMS.seo_config
10
10
  belongs_to :seoable, polymorphic: true
11
+
12
+ def self.separate_table?
13
+ (RocketCMS.mongoid? && RocketCMS.config.separate_seo_table) || (RocketCMS.active_record? && Seo.table_exists?)
14
+ end
11
15
  end
12
16
 
@@ -78,7 +78,7 @@ module RocketCMS
78
78
  read_only true
79
79
  end
80
80
  end
81
- if Seo.table_exists?
81
+ if Seo.separate_table?
82
82
  group :seo do
83
83
  active true
84
84
  field :seo do
@@ -27,6 +27,8 @@ module RocketCMS
27
27
  attr_accessor :contacts_fields
28
28
  attr_accessor :contacts_message_required
29
29
 
30
+ attr_accessor :separate_seo_table
31
+
30
32
  attr_accessor :localize
31
33
 
32
34
  def initialize
@@ -50,6 +52,8 @@ module RocketCMS
50
52
  @contacts_message_required = true
51
53
 
52
54
  @localize = false
55
+
56
+ @separate_seo_table = false
53
57
  end
54
58
 
55
59
  def search_enabled=(val)
@@ -21,7 +21,7 @@ module RocketCMS
21
21
  RocketCMS.config.search_models.map(&:constantize)
22
22
 
23
23
  # Write default email settings to DB so they can be changed.
24
- if Settings.table_exists?
24
+ if RocketCMS.mongoid? || Settings.table_exists?
25
25
  Settings.default_email_from(default: 'noreply@rscx.ru')
26
26
  Settings.form_email(default: 'glebtv@ya.ru')
27
27
  Settings.email_topic(default: 'с сайта')
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
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.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv