
ActiveRecord::Base是如何生成attributes_methods?關于這個問題相信看過《Ruby元編程》一書的伙伴能了解到從,...
active record 在create/update的時候會默認更新created_at/updated_at字段為當前字段,可以通過con...
負責ActiveRecord::Base的association部分的實現,也就是has_many, has_one等等。先看到我們平時用的ha...
這個模塊想必大家都會很熟悉,在rails的基礎教程里負責password的加密和驗證,主要就是給ActiveRecord::Base添加了pas...
ActiveRecord::AutosaveAssociation 這個模塊主要是負責自動保存associated records當,它的par...
根據ActiveRecord::Base里的繼承鏈向上閱讀 ActiveRecord::Suppressor 先是Suppressor,先看功能...
ActiveRecord::NestedAttributes nest attributes的實現部分,也就是嵌套數據部分: 主要部分為modu...
ActiveRecord::Transaction 實現transaction部分的功能。 暴露給我們的方法主要是在ClassMethods里:...
ActiveRecord::TouchLater 用了touch_later,來touch的話,會將touch延遲到別的語句執行完之后在comm...