Sha256: ab1583b021a74792eac56434a52b870eb2ad4e088fe9324199d7a99cb9772151

Contents?: true

Size: 247 Bytes

Versions: 7

Compression:

Stored size: 247 Bytes

Contents

class TrackableTag < ApplicationRecord
  validates_presence_of :name
  validates_uniqueness_of :name
  strip_attributes
  has_many :trackable_events, dependent: :destroy

  def sorted_events
    trackable_events.order(created_at: :desc)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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