search for: userpkactiverecord

Displaying 1 result from an estimated 1 matches for "userpkactiverecord".

2006 Feb 28
0
ActiveRecord: Legacy primary keys
...tter way to do the "update" method. (It is overridden so that you can update the primary key) - Is overriding self.inherited a good idea? - This implementation works for me, are there any other features anyone can think of that they may require in this instance? Usage: class AType < UserPKActiveRecord set_primary_key ''a_type_cd'' end Base Class: class UserPKActiveRecord < ActiveRecord::Base def self.inherited(sub) set_table_name undecorated_table_name(sub) self.class_eval <<-EOS def initialize params = nil super self.id = params[self.cl...