Sha256: 703ba7897f543996de8985f919ca019ade679c9152a17583e52b191ce2ace55a
Contents?: true
Size: 730 Bytes
Versions: 6
Compression:
Stored size: 730 Bytes
Contents
module ActiveRecord class BaseWithoutTable < Base self.abstract_class = true def create_or_update errors.empty? end class << self def columns() @columns ||= [] end def column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) reset_column_information end # Do not reset @columns def reset_column_information generated_methods.each { |name| undef_method(name) } @column_names = @columns_hash = @content_columns = @dynamic_methods_hash = @read_methods = nil end end end end
Version data entries
6 entries across 6 versions & 1 rubygems