about summary refs log tree commit diff stats
path: root/app/models/stream.rb
blob: 1398b75dd1e7582dc0dddc072b8096b2811acdf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
class Stream < ApplicationRecord
  include Recordable

  has_many :updates

  validates :title, presence: true
  validates :slug, presence: true, format: /\A[-a-z0-9]+\z/

  def path
    "/thinks/#{slug}"
  end
end