Forum: Ruby on Rails Updation of the object field values.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tushar G. (Guest)
on 2008-11-25 15:42
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
Thorsten M. (Guest)
on 2008-11-25 16:28
(Received via mailing list)
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
Tushar G. (Guest)
on 2008-11-26 14:22
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
Tushar G. (Guest)
on 2008-11-26 14:23
 Hi,
 I tried this but that solution is not working.

 Is there any other way to do that?
 Thanks,
 Tushar
This topic is locked and can not be replied to.