Forum: Ruby on Rails script/console : modify an attribute

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.
Guillaume L. (Guest)
on 2009-02-19 19:23
Hello everyone! :)

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 :)
Frederick C. (Guest)
on 2009-02-19 19:48
(Received via mailing list)
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
This topic is locked and can not be replied to.