# ActiveRecord: save\_only\_valid\_attributes?

**URL:** <https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148578>\
**Category:** Rails\
**Created:** [September 15, 2008, 9:38am UTC](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148578 "2008-09-15T09:38:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brady8](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecccb3/32.png) [@brady8](https://www.ruby-forum.com/u/brady8)\
**Post date:** [September 15, 2008, 9:38am UTC](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148578/1 "2008-09-15T09:38:56Z")

</div>

Hello,

I’ve been going through the Rails code today, looking for a method  
that will allow me to save an invalid record, but only update  
attributes that do not have errors attached. (i.e.  
model.errors.on(:attribute) is nil).

Any ideas on how to accomplish this would be appreciated. If this  
isn’t a part of Rails, I think it would be used enough to be a good  
idea for a patch.

Thanks,  
Brady
