# File lib/active_model/deprecated_error_methods.rb, line 18 18: def add_to_base(msg) 19: ActiveSupport::Deprecation.warn "Errors#add_to_base(msg) has been deprecated, use Errors#add(:base, msg) instead" 20: self[:base] << msg 21: end
# File lib/active_model/deprecated_error_methods.rb, line 28 28: def each_full 29: ActiveSupport::Deprecation.warn "Errors#each_full has been deprecated, use Errors#to_a.each instead" 30: to_a.each { |error| yield error } 31: end
# File lib/active_model/deprecated_error_methods.rb, line 23 23: def invalid?(attribute) 24: ActiveSupport::Deprecation.warn "Errors#invalid?(attribute) has been deprecated, use Errors#[attribute].any? instead" 25: self[attribute].any? 26: end
# File lib/active_model/deprecated_error_methods.rb, line 3 3: def on(attribute) 4: message = "Errors#on have been deprecated, use Errors#[] instead.\n" 5: message << "Also note that the behaviour of Errors#[] has changed. Errors#[] now always returns an Array. An empty Array is " 6: message << "returned when there are no errors on the specified attribute." 7: ActiveSupport::Deprecation.warn(message) 8: 9: errors = self[attribute] 10: errors.size < 2 ? errors.first : errors 11: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.