Sha256: 34ba4748a6a9282b574df1f59551cc4d60d99f9b5d87349a5084ef544f70b6ed

Contents?: true

Size: 286 Bytes

Versions: 9

Compression:

Stored size: 286 Bytes

Contents

class TrackableEvent < ApplicationRecord
  validates_presence_of :band_id, :trackable_tag, :user
  validates_uniqueness_of :band_id, scope: :trackable_tag_id, if: -> { !trackable_tag&.allow_duplicate_band_events }

  strip_attributes

  belongs_to :trackable_tag
  belongs_to :user
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hackathon_manager-0.14.1 app/models/trackable_event.rb
hackathon_manager-0.14.0 app/models/trackable_event.rb
hackathon_manager-0.13.12 app/models/trackable_event.rb
hackathon_manager-0.13.11 app/models/trackable_event.rb
hackathon_manager-0.13.10 app/models/trackable_event.rb
hackathon_manager-0.13.9 app/models/trackable_event.rb
hackathon_manager-0.13.8 app/models/trackable_event.rb
hackathon_manager-0.13.7 app/models/trackable_event.rb
hackathon_manager-0.13.6 app/models/trackable_event.rb