3.2.1 add compatibility for Rails 4; closes #2