has_errors?()
Check whether the resource has errors.
# File actionpack/lib/action_controller/metal/responder.rb, line 269 def has_errors? resource.respond_to?(:errors) && !resource.errors.empty? end