caboose-cms 0.5.228 → 0.5.229
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/block.rb +5 -3
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzI4M2UxMzRhNjIyNjlmNWI5MTgyNzFiNDQ4ZDU0MGI3YjUyODc5NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWQ1ZWUzYmU0ZjE4NTE5ZWI5M2FiMGQxYjMyNzk5ZTdhYjBjYWZmYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjcxMGNhODYxZjBiNzM2ZDBjNDUwY2FmMDk4NWYyMmU0YTJmNzAxM2JmZTU3
|
10
|
+
Yzg0NGU5ZjA2ZjRhZTQ5ODI4NTE2ZTAyZWExNTUxMTEzMjRiNzI3NGUxM2Y1
|
11
|
+
ZjRkYzRhNTdiNzAyNjI3MzE2OGZjOTJiMjg5ZDk0NTQ2OGFhNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzUzZGZhMGU0OWZjMmI5YjFkNjFmMDkyNDQ0OTI2Yjk2YmU3MTRmNWJiNTcz
|
14
|
+
MDdkZmY4ZDQxZTg1ZGYyZTdhZWM3ZWNjOTQ1MWI3Y2NhMGM2YzZhNDBkOGE5
|
15
|
+
MWUzYTIxZTBkZmJlNGNjYzE2YTUxZGExYWE0NWIxYzBmMWNmMDk=
|
data/app/models/caboose/block.rb
CHANGED
@@ -506,7 +506,8 @@ class Caboose::Block < ActiveRecord::Base
|
|
506
506
|
|
507
507
|
site_id = self.page_id ? self.page.site_id : self.post.site_id
|
508
508
|
cat = Caboose::MediaCategory.top_category(site_id)
|
509
|
-
m =
|
509
|
+
m = self.media
|
510
|
+
m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.image_file_name, :name => Caboose::Media.upload_name(self.image_file_name)) if m.nil?
|
510
511
|
m.image = URI.parse(self.image.url(:original))
|
511
512
|
m.processed = true
|
512
513
|
m.save
|
@@ -517,8 +518,9 @@ class Caboose::Block < ActiveRecord::Base
|
|
517
518
|
elsif self.block_type.field_type == 'file' && !self.file_file_name.nil? && self.media_id.nil?
|
518
519
|
|
519
520
|
site_id = self.page_id ? self.page.site_id : self.post.site_id
|
520
|
-
cat = Caboose::MediaCategory.top_category(site_id)
|
521
|
-
m =
|
521
|
+
cat = Caboose::MediaCategory.top_category(site_id)
|
522
|
+
m = self.media
|
523
|
+
m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.file_file_name, :name => Caboose::Media.upload_name(self.file_file_name)) if m.nil?
|
522
524
|
m.file = URI.parse(self.file.url)
|
523
525
|
m.processed = true
|
524
526
|
m.save
|
data/lib/caboose/version.rb
CHANGED