Archive for November, 2009

遗留系统模型处理

Wednesday, November 11th, 2009

class BillingLog < ActiveRecord::Base
set_table_name “stt.billing_log”

def self.get_pk
BillingLog.columns.first.name.to_s
end

set_primary_key self.get_pk

###BEGIN###
#注意请勿修改BEGIN和END两行!!!!!!
#请在以下空白处进行所需要的修改
#出了BEGIN END注释块外的修改将在下一次代码生成时被覆盖

def to_url
“/billing_log/#{id}.html”
end

###END###
end