Sha256: d644c8d06d3a68eca38458e22cd242009b95c975ae052f9a23353dd6534bff8f
Contents?: true
Size: 391 Bytes
Versions: 1
Compression:
Stored size: 391 Bytes
Contents
# # See http://railscasts.com/episodes/193-tableless-model # class TablelessModel < 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 def initialize(attributes = nil) super(attributes) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
auxiliary_addons-0.5.7 | lib/auxiliary_addons/tableless_model.rb |