more updates to port to Rails 3