Updation of the object field values

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

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

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

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs