다음과 같이 사용자 모델이 있습니다.컨트롤러 메서드에서 특정 필드 값을 업데이트하는 방법?
t.string "name"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
t.string "encrypted_password"
t.string "salt"
t.string "remember_token"
t.boolean "admin"
t.boolean "active"
active 속성의 부울 값을 변경해야합니다. 내 방법으로 어떻게 할 수 있습니까?
@ user.update_attribute (: 활성, true) –
건재하다. 감사합니다 4 ur 도움. –