app/views/layouts/application.js.erb in poke_js-0.1.6 vs app/views/layouts/application.js.erb in poke_js-0.1.7
- old
+ new
@@ -1,6 +1,5 @@
(function() {
- <% controller, action = poke_js_template %>
- POKE.define('POKE', { controller: "<%=controller%>", action: "<%=action%>", method: "<%=request.method%>", path: "<%=request.env['PATH_INFO']%>" });
- APP.<%= controller.gsub("/", ".") %>.js.<%= action %>_params = <%= yield %>;
- POKE.exec_all('<%= poke_js_template[0] %>', 'js', '<%= poke_js_template[1] %>');
+ POKE.create_namespace('<%= poke_js_params %>');
+ <%= poke_js_params %> = <%= define_poke_js_params { yield } %>;
+ POKE.exec_all(<%= poke_js_params %>);
})();
\ No newline at end of file