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.
007bac1f27905cd4d5d88315e9b0093a?d=identicon&s=25 Guillaume Loader (loader)
on 2009-02-19 02: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 :)
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2009-02-19 10: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.
007bac1f27905cd4d5d88315e9b0093a?d=identicon&s=25 Guillaume Loader (loader)
on 2009-02-19 18:23
Ok, I'll post it in the correct forum. Thanks!
This topic is locked and can not be replied to.