Script/console : modify an attribute


#1

Hello everyone! :slight_smile:

I would like to know how to modify a variable in the console?

I did this :
e = Entry.find(:first)
e.dev.community.name = “Ruby Geeks”
e.save

But when I look into my database, the variable didn’t changed. Did I
mystype?

Thank you :slight_smile:


#2

On 19 Feb 2009, at 17:23, Guillaume L. wrote:

But when I look into my database, the variable didn’t changed. Did I
mystype?

you didn’t save the right object - e.dev.community.save would

Fred