caboose-cms 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/blocks_controller.rb +4 -2
- data/app/models/caboose/block.rb +2 -1
- data/lib/caboose/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: ff306c78d0b489f8c5391054dcd5fd79949f7dc7
|
4
|
+
data.tar.gz: 00a97b2eb20397c9f0368c3354a7eaa70e345137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3fe40847cdd9b2d838e59cba6f8e33d2050f302970e3c8f7b73f05c879dfb723508c631408ceee7ae52fdc759cb2b8245ae6bd5cd53ee3a5872ed46b1a913be
|
7
|
+
data.tar.gz: 1c79610d4cb1e667c5c68849e27fa0721c3ba2e9f3649d6193e668f699728cc9f71c5fe24df9198d925d8a8b1167bdb3c02848581bdf4d1368451aeabcaf934e
|
@@ -166,7 +166,8 @@ module Caboose
|
|
166
166
|
# GET /admin/pages/:page_id/blocks/render-second-level
|
167
167
|
# GET /admin/posts/:post_id/blocks/render-second-level
|
168
168
|
def admin_render_second_level
|
169
|
-
return unless user_is_allowed('pages', 'edit')
|
169
|
+
return unless user_is_allowed('pages', 'edit')
|
170
|
+
view = ActionView::Base.new(ActionController::Base.view_paths)
|
170
171
|
blocks = @p.block.children.collect do |b|
|
171
172
|
{
|
172
173
|
:id => b.id,
|
@@ -186,7 +187,8 @@ module Caboose
|
|
186
187
|
:site => @site,
|
187
188
|
:page => params[:page_id] ? @p : nil,
|
188
189
|
:post => params[:post_id] ? @p : nil,
|
189
|
-
:request => request
|
190
|
+
:request => request,
|
191
|
+
:params => params
|
190
192
|
})
|
191
193
|
}
|
192
194
|
end
|
data/app/models/caboose/block.rb
CHANGED
@@ -86,7 +86,8 @@ class Caboose::Block < ActiveRecord::Base
|
|
86
86
|
return b.media.file if b.media
|
87
87
|
return b.file
|
88
88
|
end
|
89
|
-
|
89
|
+
view = options && options[:view] ? options[:view] : ActionView::Base.new(ActionController::Base.view_paths)
|
90
|
+
return view.render(:inline => b.value, :locals => options)
|
90
91
|
end
|
91
92
|
|
92
93
|
def child(name)
|
data/lib/caboose/version.rb
CHANGED