Fixed not working well on rails 3.2 or more

Did not work well on rails 3.2 or more, it has been fixed.
In addition, I have also been fixed for the issue of #2 and #3.

Regards