caboose-cms 0.7.9 → 0.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/caboose/block.rb +15 -1
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a70827123c9a2ab434f55b1a2d172d92f3b9443
|
4
|
+
data.tar.gz: ff1c55fab2918425ca9fd94b60f751002cff0514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2340fce950be8789cf970d01e630bdc226ab23e68bf3c68d14a596c1fec23065b716c14e87be0e256137e47c66dc53749924901f88ad79aea0256901d5707d2c
|
7
|
+
data.tar.gz: b9f9dd51c50f10986c27b0e1ff2c3550e8d8fc2a683b5018553cb2245a122c4032a9ed911f12ad5491261bb032e224ad10a82b027eb412a234a4e3fc7512a782
|
data/app/models/caboose/block.rb
CHANGED
@@ -71,10 +71,24 @@ class Caboose::Block < ActiveRecord::Base
|
|
71
71
|
return b.file
|
72
72
|
end
|
73
73
|
#return b.image if b.block_type.field_type == 'image'
|
74
|
-
#return b.file if b.block_type.field_type == 'file'
|
74
|
+
#return b.file if b.block_type.field_type == 'file'
|
75
75
|
return b.value
|
76
76
|
end
|
77
77
|
|
78
|
+
def rendered_child_value(name, options)
|
79
|
+
b = self.child(name)
|
80
|
+
return nil if b.nil?
|
81
|
+
if b.block_type.field_type == 'image'
|
82
|
+
return b.media.image if b.media
|
83
|
+
return b.image
|
84
|
+
end
|
85
|
+
if b.block_type.field_type == 'file'
|
86
|
+
return b.media.file if b.media
|
87
|
+
return b.file
|
88
|
+
end
|
89
|
+
return options[:view].render(:inline => b.value, :locals => options)
|
90
|
+
end
|
91
|
+
|
78
92
|
def child(name)
|
79
93
|
Caboose::Block.where("parent_id = ? and name = ?", self.id, name).first
|
80
94
|
end
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|