Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
ActiveRecord::Base#has_errors?
#41
I really hate typing unless @foo.errors.blank? when I really mean if @user.has_errors? and thought this might make a good patch on Rails. Calling #invalid? actually clears the errors and redoes the validation which isn't the behavior I want here. I just want to know that the object has errors.
I didn't add tests because it seems a really simple patch and it would probably require mocha to assert that the validations don't get run. I'm completely open to writing tests if need be though.