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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/concerns/seoable.rb +1 -1
- data/app/models/seo.rb +4 -0
- data/lib/rocket_cms/admin.rb +1 -1
- data/lib/rocket_cms/configuration.rb +4 -0
- data/lib/rocket_cms/engine.rb +1 -1
- data/lib/rocket_cms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03a571d9cc9684df5c1e787d54adad42d1f54aa4
|
4
|
+
data.tar.gz: 1c674ea4a922223cbe544407784edbae5d33ef8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e323a5c1a761de8984d3f388bb1667195a97ea816c8f38ca2149d83c1e3d33fde26424c7c6b150d5656a453c5c3a1217b667ceef0559b6334d1433daf3b51615
|
7
|
+
data.tar.gz: 4b6bf2f253ae5351292eb2c810a05b7e93624d79708e0d1c8bd5004bde2e0d1f007fc43e349c1f6df13aff57c6f55943d08658acd93979736ba12ad2d8941360
|
data/Gemfile.lock
CHANGED
@@ -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.
|
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
|
|
data/lib/rocket_cms/admin.rb
CHANGED
@@ -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)
|
data/lib/rocket_cms/engine.rb
CHANGED
@@ -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: 'с сайта')
|
data/lib/rocket_cms/version.rb
CHANGED