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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a70827123c9a2ab434f55b1a2d172d92f3b9443
4
- data.tar.gz: ff1c55fab2918425ca9fd94b60f751002cff0514
3
+ metadata.gz: ff306c78d0b489f8c5391054dcd5fd79949f7dc7
4
+ data.tar.gz: 00a97b2eb20397c9f0368c3354a7eaa70e345137
5
5
  SHA512:
6
- metadata.gz: 2340fce950be8789cf970d01e630bdc226ab23e68bf3c68d14a596c1fec23065b716c14e87be0e256137e47c66dc53749924901f88ad79aea0256901d5707d2c
7
- data.tar.gz: b9f9dd51c50f10986c27b0e1ff2c3550e8d8fc2a683b5018553cb2245a122c4032a9ed911f12ad5491261bb032e224ad10a82b027eb412a234a4e3fc7512a782
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
@@ -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
- return options[:view].render(:inline => b.value, :locals => options)
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)
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.10'
2
+ VERSION = '0.7.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry