hocus_pocus 0.4.0 → 0.4.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e189194e1124be04610db4649e328ae71703fcf95ca1edfe2e40998735c424d
|
4
|
+
data.tar.gz: 972c0c72e3dd81a238def68e3437e192c3fb39f39749998ecf76b344faea07bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93cc9018f7b274afd9019a119ad44b2aa9a2ce1c3efdb0008e6942ded92f10adc4ed03735dc6f641380c5ee6c61c0ad0bff8625d64bad6f9ef4f8b88b3ea11af
|
7
|
+
data.tar.gz: 6e3f75ec3c25584165315454b0137b625a142f484c89799de5633415e31624c4fc477fbbad52dd9fcb335e3d85ed3c2c072a4b5064180e688ddff7a2b889cbb5
|
@@ -7,16 +7,30 @@ module HocusPocus
|
|
7
7
|
PARTIAL_FILENAMES = :__hocus_pocus_partial_filenames__
|
8
8
|
|
9
9
|
module PartialRendererExtension
|
10
|
-
|
11
|
-
(
|
12
|
-
|
10
|
+
if ::ActionView::PartialRenderer.instance_method(:render_partial).arity == 2 # Rails 6
|
11
|
+
def render_partial(view, template)
|
12
|
+
(Thread.current[HocusPocus::Editor::PARTIAL_FILENAMES] ||= []) << template unless view.controller.class.name.starts_with?('HocusPocus::')
|
13
|
+
super
|
14
|
+
end
|
15
|
+
else
|
16
|
+
def render_partial
|
17
|
+
(Thread.current[HocusPocus::Editor::PARTIAL_FILENAMES] ||= []) << @template unless @view.controller.class.name.starts_with?('HocusPocus::')
|
18
|
+
super
|
19
|
+
end
|
13
20
|
end
|
14
21
|
end
|
15
22
|
|
16
23
|
module TemplateRendererExtension
|
17
|
-
|
18
|
-
|
19
|
-
|
24
|
+
if ::ActionView::TemplateRenderer.instance_method(:render_template).arity == 4 # Rails 6
|
25
|
+
def render_template(view, template, layout_name, locals)
|
26
|
+
Thread.current[HocusPocus::Editor::VIEW_FILENAME] = template.virtual_path if view.controller.try(:request).try(:format).try(:html?) && !view.controller.class.name.starts_with?('HocusPocus::')
|
27
|
+
super
|
28
|
+
end
|
29
|
+
else
|
30
|
+
def render_template(template, layout_name = nil, locals = {})
|
31
|
+
Thread.current[HocusPocus::Editor::VIEW_FILENAME] = template.virtual_path if @view.controller.try(:request).try(:format).try(:html?) && !@view.controller.class.name.starts_with?('HocusPocus::')
|
32
|
+
super
|
33
|
+
end
|
20
34
|
end
|
21
35
|
end
|
22
36
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div id="container">
|
18
18
|
<div id="generate">
|
19
19
|
<h1>Generate Scaffold</h1>
|
20
|
-
<%= form_tag scaffold_generator_path, :remote => true, :id => 'generator_form' do %>
|
20
|
+
<%= form_tag scaffold_generator_path, :remote => true, :id => 'generator_form', authenticity_token: true do %>
|
21
21
|
<h2>
|
22
22
|
<% if @name.include? '_' %>
|
23
23
|
g scaffold
|
data/lib/hocus_pocus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hocus_pocus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nested_scaffold
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.0.
|
118
|
+
rubygems_version: 3.0.3
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A magical Engine that casts a spell on your Rails 3.1 app
|