lady_josephine 0.0.3 → 0.0.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: 96836583a3e4331c8b577d0cfb417ac3668ca033
4
- data.tar.gz: 58d46d9fadbb8e252bf71cdf01dcb33a7558b5f3
3
+ metadata.gz: 08931081c421edff4ff267a29010ed27df43c500
4
+ data.tar.gz: fe6f745e500f34a055e86fa704e7b756aee19f12
5
5
  SHA512:
6
- metadata.gz: 4b1ab78ee938cf207e27e248b4cc17137b0a6a53068ea4d43c8a24c78c697c0a8eb96e9bf8f0ff76ce70f5c115bfb5cb43d73b2467b1d65c37334281fb7cb104
7
- data.tar.gz: 8a60ba9194067bb86c11eeca173920e7d04434fad2abc6e579bfe999c60560b032a2df39f56ee125cf747e60f6bacf366cffeecdfec89196c2f4f9df7e4975fb
6
+ metadata.gz: f58b27466ad81cdc654cbd00549a31f7bdd6413d7b928800d374e7955fbd6fea6b53159a279d1db6068e953af93e5a5a9347850b938265b2da9714966252d3a7
7
+ data.tar.gz: 1a8ff67c4f2516dbddc88067dcc2bc97f116bacc488b04f63f93a368605c66f596652eefefdb09f51bab20ce21f0879b2c4b20999ba62142e18bddbdedbf71bc
@@ -158,14 +158,24 @@ module LadyJosephine
158
158
  end
159
159
 
160
160
  def render_sir_trevor_block(object, image_type = 'large', options = {})
161
- view_name = "lady_josephine/blocks/#{object['type'].to_s.downcase}_block"
162
- LadyJosephine::ApplicationController.new.render_to_string(
163
- :partial => view_name,
164
- :locals => {
165
- :block => object['data'],
166
- :options => options
167
- }
168
- )
161
+ context = Class.new(ActionView::Base) do
162
+ include ActionView::RoutingUrlFor
163
+ include ApplicationHelper
164
+ include Rails.application.routes.url_helpers
165
+ include Rails.application.routes.mounted_helpers
166
+ include SirTrevorHelper
167
+
168
+ def default_url_options
169
+ {}
170
+ end
171
+ end
172
+
173
+ view_name = "lady_josephine/blocks/_#{object['type'].to_s.downcase}_block"
174
+ view = context.new(["#{Rails.root}/app/views", "#{__FILE__}/../../../views"], {})
175
+ view.render(template: view_name, locals: {
176
+ :block => object['data'],
177
+ :options => options
178
+ })
169
179
  end
170
180
 
171
181
  end
@@ -1,3 +1,3 @@
1
1
  module LadyJosephine
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lady_josephine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodo Tasche
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-01 00:00:00.000000000 Z
12
+ date: 2016-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails