These are chat archives for rails-sqlserver/activerecord-sqlserver-adapter
def load_schema! @columns_hash = connection.schema_cache.columns_hash(table_name) @columns_hash.each do |name, column| define_attribute( name, column.cast_type, default: column.default, user_provided_default: false ) end end
Sean Griffin does a great job explaining this convoluted process. Warning, it's kind of boring and a chore to read.
I didn't mean for the first one to be boring. :(