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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -