Sha256: 4f1f72ab08fbf5c6bfc4e18dce089ed860f2b0275e598f856795780df39914a3

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

module FieldTest
  class Membership < ActiveRecord::Base
    self.table_name = "field_test_memberships"

    has_many :events, class_name: "FieldTest::Event"

    validates :participant, presence: true, if: -> { FieldTest.legacy_participants }
    validates :participant_id, presence: true, if: -> { !FieldTest.legacy_participants }
    validates :experiment, presence: true
    validates :variant, presence: true
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
field_test-0.5.1 app/models/field_test/membership.rb
field_test-0.5.0 app/models/field_test/membership.rb
field_test-0.4.1 app/models/field_test/membership.rb
field_test-0.4.0 app/models/field_test/membership.rb
field_test-0.3.2 app/models/field_test/membership.rb
field_test-0.3.1 app/models/field_test/membership.rb
field_test-0.3.0 app/models/field_test/membership.rb