Sha256: 0add773efc4a98a238222b3784e3e6dccfbb3a05a18f9cabb8110cfc2e3a2851

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

require 'rubygems'
require 'omelettes'

RSpec.configure do |config|
end

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

end

class User < TablelessModel
  column :id, :integer
  column :first_name, :string
  column :middle_name, :string
  column :last_name, :string
  column :city, :string
  column :age, :integer
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omelettes-0.5.2 spec/spec_helper.rb
omelettes-0.5.1 spec/spec_helper.rb
omelettes-0.5.0 spec/spec_helper.rb
omelettes-0.2.0 spec/spec_helper.rb