Support rails 4.1

4-0-beta is the only branch that I found to be most stable. Add support for rails 4.1
Need to parse string to regexp. was getting undefined.