Some more changes for Rails 3

Will break Rails 2 compatibility