Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gab
social
gab-social
Commits
318ab7be
Commit
318ab7be
authored
Jul 29, 2019
by
2458773093
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status quote relations
parent
3e5b9a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app/models/status.rb
app/models/status.rb
+3
-0
No files found.
app/models/status.rb
View file @
318ab7be
...
...
@@ -23,6 +23,7 @@
# in_reply_to_account_id :bigint(8)
# poll_id :bigint(8)
# group_id :integer
# quote_id :bigint(8)
#
class
Status
<
ApplicationRecord
...
...
@@ -51,9 +52,11 @@ class Status < ApplicationRecord
belongs_to
:thread
,
foreign_key:
'in_reply_to_id'
,
class_name:
'Status'
,
inverse_of: :replies
,
optional:
true
belongs_to
:reblog
,
foreign_key:
'reblog_of_id'
,
class_name:
'Status'
,
inverse_of: :reblogs
,
optional:
true
belongs_to
:quote
,
foreign_key:
'quote_of_id'
,
class_name:
'Status'
,
inverse_of: :quotes
,
optional:
true
has_many
:favourites
,
inverse_of: :status
,
dependent: :destroy
has_many
:reblogs
,
foreign_key:
'reblog_of_id'
,
class_name:
'Status'
,
inverse_of: :reblog
,
dependent: :destroy
has_many
:quotes
,
foreign_key:
'quote_of_id'
,
class_name:
'Status'
,
inverse_of: :quote
,
dependent: :nullify
has_many
:replies
,
foreign_key:
'in_reply_to_id'
,
class_name:
'Status'
,
inverse_of: :thread
has_many
:mentions
,
dependent: :destroy
,
inverse_of: :status
has_many
:active_mentions
,
->
{
active
},
class_name:
'Mention'
,
inverse_of: :status
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment