Sha256: cd2cb2353dad2e05fbdf607b313ca8afd2e780b039065f5f5430a90995ec95ab
Contents?: true
Size: 512 Bytes
Versions: 4
Compression:
Stored size: 512 Bytes
Contents
<% require "rails-routes-js-utils" %> window.Routes = {}; window.AllRoutes = []; function addRouteToEnv(obj) { window.Routes[obj.name+'_path'] = function(idOrObject){ if (typeof idOrObject == 'object') return obj.replace(idOrObject); var param= {}; for (var i=0;i<obj.reqs.parts.length;i++) { param[obj.reqs.parts[i]] = arguments[i]; } return obj.replace(param); }; window.AllRoutes.push(obj); } <%= Rails::Routes::Js::Utils.generate %>
Version data entries
4 entries across 4 versions & 1 rubygems