Sha256: 94dea64e5928bb383a5802ff721f4baafb5350f8bca270eaa535dddce431805d
Contents?: true
Size: 514 Bytes
Versions: 1
Compression:
Stored size: 514 Bytes
Contents
require 'active_record' ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" ActiveRecord::Migration.create_table :users do |t| t.string :email t.string :name t.timestamps end class User < ActiveRecord::Base # Without form validations. # Only Domain Validations end class BaseAuthForm < FormObject::Base map_model User attribute :email, String validates :email, :presence => true end class TwitterAuthForm < FormObject::Base map_model User, :as => :twitter end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
form_object-0.1.1 | test/support/active_record.rb |