Ignore columns in a legacy database with ActiveRecord
4/07/2008Add this to the model:
# prevent ActiveRecord stumbling on the column named 'hash' # by removing it from the column list class << self # Class methods alias :all_columns :columns def columns all_columns.reject {|c| c.name == 'hash'} end end
Solution half-inched from:
http://groups.google.com/group/compositekeys/msg/202d04713ecbd6ee