The code powering m.abunchtell.com https://m.abunchtell.com
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

24 řádky
626 B

  1. # frozen_string_literal: true
  2. # == Schema Information
  3. #
  4. # Table name: markers
  5. #
  6. # id :bigint(8) not null, primary key
  7. # user_id :bigint(8)
  8. # timeline :string default(""), not null
  9. # last_read_id :bigint(8) default(0), not null
  10. # lock_version :integer default(0), not null
  11. # created_at :datetime not null
  12. # updated_at :datetime not null
  13. #
  14. class Marker < ApplicationRecord
  15. TIMELINES = %w(home notifications).freeze
  16. belongs_to :user
  17. validates :timeline, :last_read_id, presence: true
  18. validates :timeline, inclusion: { in: TIMELINES }
  19. end