Support rails 4.1

4-0-beta is the only branch that I found to be most stable. Add support for rails 4.1
needed to update ruby -> javascript regexp method. was getting stack overflows w/ 4.1