Posted By

almazom on 09/17/09



Versions (?)

how to know ROR action name in Javascript

 / Published in: JavaScript

  1. var l = String(window.location).split('/')
  2. var action = l[l.length-1].split('?')[0]

Report this snippet  


RSS Icon Subscribe to comments
Posted By: almazom on October 7, 2009

easy way to know action name in pure javascript. of course, if U using ruby on rails

Posted By: almazom on October 21, 2009

*correction if exist params in url

var l = String(window.location).split('/') var action = l[l.length-1].split('?')[0]

You need to login to post a comment.