Updated some code so that the plugin works with Rails 4.0.0.