The method add_to_base(msg) in given link :
http://rails.rubyonrails.org/classes/ActiveRecord/Errors.html#M001712
is it really adding the message to Activerecord::Base is it what the document refers to as base object ?
Although i know the method is deprecated in rails 3
ActiveRecord::Base is the class that all ActiveRecord classes inherit from and it’s quite confusing to think of it as the thing that the base object is derived from even though they share the same name. Base in the context of add_to_base means an instance of Foo < ActiveRecord::Base (for example)
It adds it to the base object rather than attaching any notion of errors directly to an attribute, this may be because an error may not specifically mention any attributes that the person may be changing or the error is associated with multiple attributes.
For Rails 3 – its
errors.add(:base, msg)