Skip to content

Commit

Permalink
PersonCard: get top_identifiers from term instead
Browse files Browse the repository at this point in the history
This is now directly available from the LegislativePeriod object (called
'term') so there's no need to pass it to the initializer.
  • Loading branch information
mhl committed Jan 17, 2017
1 parent 7ff544e commit 947db9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/page/term_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def people
PersonCard.new(
person: person,
term: term,
top_identifiers: top_identifiers
)
end
end
Expand Down
6 changes: 2 additions & 4 deletions lib/person_cards.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# frozen_string_literal: true

class PersonCard

# TODO: pass fewer arguments!
def initialize(person:, term:, top_identifiers:)
def initialize(person:, term:)
@person = person
@term = term
@legislature = term.legislature
@top_identifiers = top_identifiers # get from Legislature
@top_identifiers = term.top_identifiers
end

def proxy_image
Expand Down

0 comments on commit 947db9f

Please sign in to comment.