Fix compatibility with Rails 3
Release version 0.3.1

Add compatibility with Rails 3