Following Commit Ensure a fix to Rails 3 and Rails 4