# Update\_all not changing updated\_at

**URL:** <https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016>\
**Category:** Rails\
**Created:** [July 2, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016 "2008-07-02T17:00:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [July 2, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016/1 "2008-07-02T17:00:10Z")

</div>

Hi everyone-

Model.update\_all works and changes the records, but it’s not changing  
the updated\_at field. Am I doing something wrong or is this by  
design?

Thanks,  
Dino

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [July 2, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016/2 "2008-07-02T17:01:58Z")

</div>

On 2 Jul 2008, at 15:59, dino d. wrote:

> Hi everyone-
> 
> Model.update\_all works and changes the records, but it’s not changing  
> the updated\_at field. Am I doing something wrong or is this by  
> design?

Model.update\_all works at a lower level that all that stuff.

Fred

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [July 2, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016/3 "2008-07-02T17:09:02Z")

</div>

Thanks for the reply. I’m just trying to do some offline ranking, is  
there a better way to do this than update\_all?  
Dino

On Jul 2, 11:01 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [July 2, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016/4 "2008-07-02T17:10:13Z")

</div>

On 2 Jul 2008, at 16:08, dino d. wrote:

> Thanks for the reply. I’m just trying to do some offline ranking, is  
> there a better way to do this than update\_all?

You could easily make your call to update\_all update the updated\_at  
column (although it would be indiscriminate)

Fred
