Forum: Ruby 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 03:50
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 :)
Brian C. (Guest)
on 2009-02-19 11:07
Questions about the Rails application framework, or parts of Rails such
as ActiveRecord, would best be asked on a Rails mailing list.

This is the Ruby (programming language) list.
Guillaume L. (Guest)
on 2009-02-19 19:23
Ok, I'll post it in the correct forum. Thanks!
This topic is locked and can not be replied to.