Skip to content

Instantly share code, notes, and snippets.

@hmans
Created July 23, 2009 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmans/152806 to your computer and use it in GitHub Desktop.
Save hmans/152806 to your computer and use it in GitHub Desktop.
module ActiveRecord
class TablelessBase < ActiveRecord::Base
def self.columns() @columns ||= []; end
def self.column(name, sql_type = nil, default = nil, null = true)
columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment