Skip to content

Commit

Permalink
two-way link fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Mar 26, 2020
1 parent a4ca8cf commit 9e0249f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/models/page_groupers/group_allyship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class GroupAllyship < ApplicationRecord
this_object = Group.find_by(id: self.group_id)
other_object = Group.find_by(id: self.ally_id)

other_object.allies.delete this_object
other_object.allies.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/group_enemyship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class GroupEnemyship < ApplicationRecord
this_object = Group.find_by(id: self.group_id)
other_object = Group.find_by(id: self.enemy_id)

other_object.enemies.delete this_object
other_object.enemies.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/sistergroupship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class Sistergroupship < ApplicationRecord
this_object = Group.find_by(id: self.group_id)
other_object = Group.find_by(id: self.sistergroup_id)

other_object.sistergroups.delete this_object
other_object.sistergroups.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/subgroupship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class Subgroupship < ApplicationRecord
this_object = Group.find_by(id: self.group_id)
other_object = Group.find_by(id: self.subgroup_id)

other_object.supergroups.delete(this_object)
other_object.supergroups.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/technology_child_technology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class TechnologyChildTechnology < ApplicationRecord
this_object = Technology.find_by(id: self.technology_id)
other_object = Technology.find_by(id: self.child_technology_id)

other_object.parent_technologies.delete(this_object)
other_object.parent_technologies.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/technology_parent_technology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class TechnologyParentTechnology < ApplicationRecord
this_object = Technology.find_by(id: self.technology_id)
other_object = Technology.find_by(id: self.parent_technology_id)

other_object.child_technologies.delete(this_object)
other_object.child_technologies.delete(this_object) if other_object.present?
end
end
2 changes: 1 addition & 1 deletion app/models/page_groupers/technology_related_technology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class TechnologyRelatedTechnology < ApplicationRecord
this_object = Technology.find_by(id: self.technology_id)
other_object = Technology.find_by(id: self.related_technology_id)

other_object.related_technologies.delete(this_object)
other_object.related_technologies.delete(this_object) if other_object.present?
end
end

0 comments on commit 9e0249f

Please sign in to comment.