Upstream master

Merges in master from upstream so that we gain ActiveModel 4.1 support.