Fix of Rails 3.2 issue

This is a necessary update for Rails 3.2+