From 5128c4261e8c067321e70ffda560f14036f56bb0 Mon Sep 17 00:00:00 2001 From: aschmitz Date: Sat, 11 Nov 2017 14:37:23 -0600 Subject: Updates per code review Thanks, @valerauko! --- app/models/concerns/account_interactions.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'app/models') diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb index 60fd6ded5..a68f7c3d8 100644 --- a/app/models/concerns/account_interactions.rb +++ b/app/models/concerns/account_interactions.rb @@ -77,10 +77,7 @@ module AccountInteractions def follow!(other_account, reblogs: nil) reblogs = true if reblogs.nil? rel = active_relationships.create_with(show_reblogs: reblogs).find_or_create_by!(target_account: other_account) - if rel.show_reblogs != reblogs - rel.show_reblogs = reblogs - rel.save! - end + rel.update!(show_reblogs: reblogs) rel end -- cgit