Monkey patching ActiveResource::Errors
I've come across an issue with ActiveResource that has been resolved and was trying to monkey patch it into my application without much luck. I've added a file in config/initializers/ containing the following: class ActiveResource::Errors < ActiveModel::Errors # https://github.com/rails/rails/commit/b09b2a8401c18d1efff21b3919ac280470a6eb8b def from_hash(messages, save_cache = false) clear unless save_cache messages.each do |(key,errors)| errors.each do |error| if @base.attributes.keys.include?(key) add key, error elsif key == 'base' self[:base] << error else # reporting an error on an