好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

rails 笔记

rails 笔记

The following methods trigger validations, and will save the object to the database only if the object is valid:

create create! save save! update update_attributes update_attributes!

The bang versions (e.g.  save! ) raise an exception if the record is invalid. The non-bang versions don’t:  save  and  update_attributes  return  false ,  create  and  update  just return the objects.

查看更多关于rails 笔记的详细内容...

  阅读:48次