Sha256: 1b118d4a2d0cd433e7c0a1ab27c32dc6cffe30c2cfd09ff35cdb042d2c237239
Contents?: true
Size: 713 Bytes
Versions: 1
Compression:
Stored size: 713 Bytes
Contents
module RailsScript module LoaderHelper def include_rails_script javascript_tag <<-RUBY jQuery(function(){window.$this=new(App.#{controller_path.split(/\/|_/).map(&:capitalize).join('')}||App.Base);if(typeof $this.#{action_name}==="function"){return $this.#{action_name}.call()}});jQuery(document).on("page:before-change",function(){var e,t,n,r,i,s,o,u;o=[window,document];u=[];for(i=0,s=o.length;i<s;i++){e=o[i];u.push(function(){var i,s;i=jQuery._data(e,"events");s=[];for(r in i){n=i[r];s.push(function(){var i,s,o;o=[];for(i=0,s=n.length;i<s;i++){t=n[i];if(t==null){continue}o.push(t.namespace===""?$(e).off(r,t.handler):void 0)}return o}())}return s}())}return u}) RUBY end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_script-0.1.4 | lib/rails_script/loader_helper.rb |