Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
e239fc30
Commit
e239fc30
authored
9 years ago
by
Eugen Rochko
Browse files
Options
Download
Email Patches
Plain Diff
Fix error when unfollowing somebody who wasn't followed in the first place
parent
d0229754
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/account.rb
+2
-1
app/models/account.rb
with
2 additions
and
1 deletion
+2
-1
app/models/account.rb
+
2
-
1
View file @
e239fc30
...
...
@@ -36,7 +36,8 @@ class Account < ActiveRecord::Base
end
def
unfollow!
(
other_account
)
self
.
active_relationships
.
find_by
(
target_account:
other_account
).
destroy
follow
=
self
.
active_relationships
.
find_by
(
target_account:
other_account
)
follow
.
destroy
unless
follow
.
nil?
end
def
following?
(
other_account
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets