instance method
has_errors?
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.1.16Signature
has_errors?()
Check whether the resource has errors.
Source
# File actionpack/lib/action_controller/metal/responder.rb, line 264
def has_errors?
resource.respond_to?(:errors) && !resource.errors.empty?
end
Defined in actionpack/lib/action_controller/metal/responder.rb line 264
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Responder