Rails Console Inserting Data into a Record -
this did
customer.all customer load (0.6ms) select "customers".* "customers" => #<activerecord::relation [#<customer id: 1, name: "judy ngai", created_at: "2013-08-13 18:50:02", updated_at: "2013-08-13 18:50:02", phone_number: nil>]>
then
judy = customer.find(1) insertdata = judy.phone_number = "1234567890" insertdata.save! or insertdata.save
gives me
nomethoderror: undefined method `save' "6265607524":string nomethoderror: undefined method `save!' "6265607524":string
what should do?
judy = customer.find(1) judy.phone_number = "1234567890" judy.save!
Comments
Post a Comment