diff options
author | Francis Irving <francis@mysociety.org> | 2009-12-03 13:14:15 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2009-12-03 13:14:15 +0000 |
commit | b42df729cda233a8022a303f8124ee6ac59b4810 (patch) | |
tree | 09763a30cb85b02327ddfcf91e4a5a12ed1e42e4 /lib | |
parent | 04b8a72931d176caab599abda8d5445d679a43c5 (diff) |
Move error deletion monkeypatch into lib
Diffstat (limited to 'lib')
-rw-r--r-- | lib/activerecord_errors_extensions.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/activerecord_errors_extensions.rb b/lib/activerecord_errors_extensions.rb new file mode 100644 index 000000000..8135d34f7 --- /dev/null +++ b/lib/activerecord_errors_extensions.rb @@ -0,0 +1,10 @@ +# Monkeypatch! activerecord/lib/active_record/validations.rb +# Method to remove individual error messages from an ActiveRecord. +module ActiveRecord + class Errors + def delete(key) + @errors.delete(key) + end + end +end + |