# Updation of the object field values

**URL:** <https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111>\
**Category:** Rails\
**Created:** [November 25, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111 "2008-11-25T14:42:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [November 25, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111/1 "2008-11-25T14:42:51Z")

</div>

Hi,

I have a group object with “name, description etc” fields. I want to  
update that object’s description in such a way that it will not reflect  
in database. You can say I want to temporary update the value of that  
field.  
Is there any way to do like this?

Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [November 25, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111/2 "2008-11-25T15:28:04Z")

</div>

You can just say

model.field = “something”

say you have a client model  
@client = Client.all.first  
@client.name = “foo”

now @client.name is “foo”  
won’t be in the database, unless you use @client.save or something  
similar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [November 26, 2008, 1:22pm UTC](https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111/3 "2008-11-26T13:22:09Z")

</div>

Thorsten M. wrote:

> You can just say
> 
> model.field = “something”
> 
> say you have a client model  
> @client = Client.all.first  
> @client.name = “foo”
> 
> now @client.name is “foo”  
> won’t be in the database, unless you use @client.save or something  
> similar

Hi,  
I tried this but that solution is not working.

Is there any object way to do that?  
Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [November 26, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/updation-of-the-object-field-values/154111/4 "2008-11-26T13:23:16Z")

</div>

Hi,  
I tried this but that solution is not working.

Is there any other way to do that?  
Thanks,  
Tushar
