-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathreport.rb
37 lines (26 loc) · 1.12 KB
/
report.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# == Schema Information
#
# Table name: reports
#
# id :integer not null, primary key
# subject :integer not null
# comment :string
# listing_id :integer
# email :string
# created_at :datetime not null
# updated_at :datetime not null
#
class Report < ApplicationRecord
# == Constants ============================================================
# == Attributes ===========================================================
# == Extensions ===========================================================
enum subject: %i[sold scam wrong_number]
# == Relationships ========================================================
belongs_to :listing
# == Validations ==========================================================
validates :subject, presence: true
# == Scopes ===============================================================
# == Callbacks ============================================================
# == Class Methods ========================================================
# == Instance Methods =====================================================
end