Class Index [+]

Quicksearch

ActiveModel::DeprecatedErrorMethods

Public Instance Methods

add_to_base(msg) click to toggle source
    # 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
each_full() click to toggle source
    # 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
invalid?(attribute) click to toggle source
    # 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
on(attribute) click to toggle source
    # 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
on_base() click to toggle source
    # File lib/active_model/deprecated_error_methods.rb, line 13
13:     def on_base
14:       ActiveSupport::Deprecation.warn "Errors#on_base have been deprecated, use Errors#[:base] instead"
15:       ActiveSupport::Deprecation.silence { on(:base) }
16:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.