Skip to content

Commit

Permalink
Add Marker#skip?
Browse files Browse the repository at this point in the history
  • Loading branch information
makicamel committed Oct 9, 2023
1 parent 717b893 commit 8714ba7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bulletmark_repairer/associations_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module BulletmarkRepairer
class AssociationsBuilder
def build(marker)
# TODO: Notify if fail to find suitable file to be patched
return unless marker.index
return if marker.skip?

if associations[marker.index]
associations[marker.index].add(marker)
Expand Down
4 changes: 4 additions & 0 deletions lib/bulletmark_repairer/markers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def add_association(notification)
@associations += notification.instance_variable_get(:@associations)
end

def skip?
index.nil?
end

def n_plus_one_in_view?
@n_plus_one_in_view
end
Expand Down

0 comments on commit 8714ba7

Please sign in to comment.