Updation of the object field values


#1

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


#2

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


#3

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


#4

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

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