# Partial\_updates feature in rails 2.1, failing to save because of validate\_presence \_of on other at

**URL:** <https://www.ruby-forum.com/t/partial-updates-feature-in-rails-2-1-failing-to-save-because-of-validate-presence-of-on-other-at/137733>\
**Category:** Rails\
**Created:** [May 15, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/partial-updates-feature-in-rails-2-1-failing-to-save-because-of-validate-presence-of-on-other-at/137733 "2008-05-15T20:23:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Virginian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/bc8723/32.png) [@Virginian](https://www.ruby-forum.com/u/Virginian)\
**Post date:** [May 15, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/partial-updates-feature-in-rails-2-1-failing-to-save-because-of-validate-presence-of-on-other-at/137733/1 "2008-05-15T20:23:47Z")

</div>

I am trying to use the new partial\_updates feature in rails 2.1,  
[http://dev.rubyonrails.org/changeset/9157](http://dev.rubyonrails.org/changeset/9157)  
but it is failing by trying to use all validations in the model  
instead of just the changed attributes. The model works as I can  
successfully .save(false) but if I try a regular .save I get an error  
saying that it could not save because of validations problems. I want  
to use this to get around the challenges of saving a part of a wide  
table without resorting to the validation\_scenarios plugin.

Any ideas on how I can fix this?

Black-Mac:turbocis89 Charles$ script/console  
Loading development environment (Rails 2.0.991)

> > Spec.partial\_updates  
> > =\> true  
> > User.partial\_updates  
> > =\> true  
> > @user = User.find\_by\_screen\_name(‘vince888’)  
> > =\> #\<User id: 1, screen\_name: “vince888”, password: “vince888”, email:  
> > “removed\_email\_address@domain.invalid”, created\_at: “2008-05-15 12:35:12”, updated\_at:  
> > “2008-05-15 13:03:38”, authorization\_token: nil\>  
> > @user.spec.city\_of\_birth  
> > =\> “Wichita”  
> > @user.spec.city\_of\_birth = ‘Charleston’  
> > =\> “Charleston”  
> > @user.spec.changes  
> > =\> {“city\_of\_birth”=\>[“Wichita”, “Charleston”]}  
> > @user.spec.save  
> > =\> false ### in the application this  
> > is failing because of other unrelated attributes not passing  
> > validations.  
> > @user.spec.save(false)  
> > =\> true
> > 
> > @user.spec.changes  
> > =\> {}
> > 
> > @user.spec.city\_of\_birth  
> > =\> “Charleston”
