about summary refs log tree commit diff
path: root/app/models/collection_page.rb
blob: e974e58a2e4e1595087f14fe153b606dc0114284 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true
# == Schema Information
#
# Table name: collection_pages
#
#  id         :bigint(8)        not null, primary key
#  account_id :bigint(8)
#  uri        :string           not null
#  next       :string
#

class CollectionPage < ApplicationRecord
  belongs_to :account, inverse_of: :collection_pages, optional: true

  default_scope { order(id: :desc) }
  scope :current, -> { where(next: nil) }
end