rocket_cms 0.8.0.pre.3 → 0.8.0.pre.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 789716626a614f49bdb9df0088fbeb82a0b3fde9
|
4
|
+
data.tar.gz: b121c37bdc1d3f33cefa0a4793dc32172714c821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af9640c59803b570e6fcd696b289b65869f5b5a737c2823a9a2d2657e997fb75b5d55f91cacb660e2f2b9431038109792348e71b37f04683bb170e65b40cd90
|
7
|
+
data.tar.gz: 523b2f3370fbd8df243f72b19a839739cfb4faef4d1234913c9e8a047e74903f67c8c381b4fc676868c5e6b1f655d0e39626d95f3b32392b2606c53490189d8b
|
data/Gemfile.lock
CHANGED
@@ -6,7 +6,6 @@ module RocketCMS
|
|
6
6
|
included do
|
7
7
|
unless RocketCMS.config.news_image_styles.nil?
|
8
8
|
has_attached_file :image, styles: RocketCMS.config.news_image_styles
|
9
|
-
validates_attachment_content_type :image, content_type: %w(image/gif image/jpeg image/jpg image/png), if: :image?
|
10
9
|
end
|
11
10
|
|
12
11
|
has_paper_trail
|
@@ -11,7 +11,6 @@ module RocketCMS
|
|
11
11
|
index({enabled: 1, time: 1})
|
12
12
|
unless RocketCMS.config.news_image_styles.nil?
|
13
13
|
has_mongoid_attached_file :image, styles: RocketCMS.config.news_image_styles
|
14
|
-
validates_attachment_content_type :image, content_type: %w(image/gif image/jpeg image/jpg image/png), if: :image?
|
15
14
|
end
|
16
15
|
field :name, type: String, localize: RocketCMS.config.localize
|
17
16
|
field :excerpt, type: String, localize: RocketCMS.config.localize
|
@@ -13,6 +13,10 @@ module RocketCMS
|
|
13
13
|
end
|
14
14
|
|
15
15
|
included do
|
16
|
+
unless RocketCMS.config.news_image_styles.nil?
|
17
|
+
validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/, if: :image?
|
18
|
+
end
|
19
|
+
|
16
20
|
validates_presence_of :name, :content
|
17
21
|
before_validation do
|
18
22
|
self.time = Time.now if self.time.blank?
|
@@ -8,7 +8,7 @@ module RocketCMS
|
|
8
8
|
|
9
9
|
included do
|
10
10
|
RocketCMS.apply_patches self
|
11
|
-
validates_attachment_content_type :og_image, content_type:
|
11
|
+
validates_attachment_content_type :og_image, content_type: /\Aimage\/.*\Z/, if: :og_image?
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/rocket_cms/version.rb
CHANGED