1.use rails console
#rails console
2.use subject.find
#subject=Subject.find(2)
3.update attribute
#subject.name="twenty man"
#subject.save
or you can use update_attribute
#subject.update_attributes(:name=>"powerman",:position=>2)
4.destory one object
#subject.delete
#subject.frozen?
沒有留言:
張貼留言