app/views/layouts/application.js.erb in poke_js-0.1.3 vs app/views/layouts/application.js.erb in poke_js-0.1.4
- old
+ new
@@ -1,7 +1,5 @@
(function() {
- var format = 'js',
- controller = '<%= poke_js_template[0] %>',
- action = '<%= poke_js_template[1] %>';
- APP[controller][format][action + '_params'] = <%= yield %>;
- POKE.exec_all(controller, format, action);
+ <% controller, action = poke_js_template %>
+ APP.<%= controller.gsub("/", ".") %>.js.<%= action %>_params = <%= yield %>;
+ POKE.exec_all('<%= poke_js_template[0] %>', 'js', '<%= poke_js_template[1] %>');
})();
\ No newline at end of file