tweak to support Rails 4 api changes