Skip to content

Commit

Permalink
Rename method to find_first_table for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux authored and emmabeynon committed Feb 7, 2018
1 parent f9827a7 commit 5ebd42f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/presenters/content_item/contents_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def first_item_has_long_table?
first_item_table_rows > TABLE_ROW_LIMIT
end

def find_table
def find_first_table
element = first_item.next_element

until element.name == 'h2' do
Expand All @@ -75,7 +75,7 @@ def find_table
end

def first_item_table_rows
@table ||= find_table
@table ||= find_first_table
@table.present? ? @table.css('tr').count : 0
end

Expand Down

0 comments on commit 5ebd42f

Please sign in to comment.