$ rails c
User モデルの一個目のデータを"u" に代入(モデルは大文字はじまり・単数)
irb(main):000:0> u = User.first
↓ 一個目出る
=> #<User id: 1, company_id: 1, group_id: nil, name: "ken_c_lo", title: "後楽園ゆうえんちで僕と握手", age: nil, profile: nil ・・・・>
データはvalidですかね? -> うんにゃ
irb(main):000:0> u.valid?
=> false
エラーは何? -> @messages 以降の部分がエラー(未入力の必須項目が確認できる)
irb(main):000:0> u.errors
=> #<User id: 1, company_id: 1, group_id: nil, name: "ken_c_lo", title: "後楽園ゆうえんちで僕と握手", age: nil, profile: nil ・・・・ >, @messages={:profile=>["を入力してください。"]}>
profile が入ってないとだめらしいのでprofileいれる
irb(main):000:0> u.profile = "よろしくよろしくよろしくです"
=> "よろしくよろしくよろしくです"
データはvalidですかね? -> おk
irb(main):000:0> u.valid?
=> true
データ揃ったらしいので保存
irb(main):000:0> u.save
(0.1ms) BEGIN
(1.7ms) UPDATE `users` SET `profile` = 'よろしくよろしくよろしくです', `updated_at` = '2013-05-14 20:25:06' WHERE `users`.`id` = 1
(0.5ms) COMMIT
=> true
ヾ('ω')ノ゙