⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 active_record.rb

📁 Flex for rails的开发demo源码
💻 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 + -