?? active_record.rb
字號:
class ActiveRecord::Base #This holds the original incoming Value Object from deserialization time, as when an incoming VO with an 'id' property #on it is found, it is 'found' (Model.find(id)) in the DB (instead of Model.new(hash)). So right before the params hash #is updated for the rails request, I slip in this original object so you can do an "update_attributes(params[:model])" #and the correct 'update' values will be used. attr_accessor :original_vo_from_deserialization def as_single! SDTOUT.puts "ActiveRecord::Base#as_single! is no longer needed, all single active records return as an object. This warning will be taken out in 1.4, please update your controller" self end def single! SDTOUT.puts "ActiveRecord::Base#as_single! is no longer needed, all single active records return as an object. This warning will be taken out in 1.4, please update your controller" self endend
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -