Sha256: 90bb7323e304a693ee40af84204589431914dd30a69b09655ab5f4f51fd5c37e
Contents?: true
Size: 307 Bytes
Versions: 4
Compression:
Stored size: 307 Bytes
Contents
class User < ActiveRecord::Base has_many :phone_numbers, dependent: :destroy validates :name, presence: true, uniqueness: true end class PhoneNumber < ActiveRecord::Base belongs_to :user validates :user_id, presence: true validates :number, presence: true, uniqueness: { scope: :user_id } end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
trans_forms-0.2.2 | spec/support/models.rb |
trans_forms-0.2.1 | spec/support/models.rb |
trans_forms-0.2.0 | spec/support/models.rb |
trans_forms-0.1.0 | spec/support/models.rb |