poke_js 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
|
|
1
1
|
(function() {
|
2
2
|
<% controller, action = poke_js_template %>
|
3
|
+
POKE.define('POKE', { controller: "<%=controller%>", action: "<%=action%>", method: "<%=request.method%>", path: "<%=request.env['PATH_INFO']%>" });
|
3
4
|
APP.<%= controller.gsub("/", ".") %>.js.<%= action %>_params = <%= yield %>;
|
4
5
|
POKE.exec_all('<%= poke_js_template[0] %>', 'js', '<%= poke_js_template[1] %>');
|
5
6
|
})();
|
data/lib/poke_js/version.rb
CHANGED
data/lib/poke_js/view_helpers.rb
CHANGED
@@ -26,10 +26,10 @@ module PokeJs
|
|
26
26
|
if format == :html
|
27
27
|
with_format(:js) do
|
28
28
|
if lookup_context.template_exists? "#{controller}/#{action}_params"
|
29
|
+
#defined in application.js.erb
|
30
|
+
poke_string = %Q/POKE.define('POKE', { controller: "#{controller}", action: "#{action}", method: "#{request.method}", path: "#{request.env['PATH_INFO']}" });/
|
29
31
|
javascript_tag do
|
30
|
-
raw %Q/
|
31
|
-
APP.#{controller.gsub("/", ".")}.html.#{action}_params = #{ render :template => "#{controller}/#{action}_params" };
|
32
|
-
/
|
32
|
+
raw %Q/APP.#{controller.gsub("/", ".")}.html.#{action}_params = #{ render :template => "#{controller}/#{action}_params" };#{poke_string}/
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poke_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|