Closed struan closed 8 years ago
Because of the underlying implementation where returns an Array which means that things build on top of it such as legislative_periods return an Array so you can't do things like:
where
legislative_periods
Everypolitician::Popolo.read(filename).legislative_periods.find_by(id: 'term/13')
as there is no find_by method on Array.
Change where to return a Collection.
This code works:
Problem
Because of the underlying implementation
where
returns an Array which means that things build on top of it such aslegislative_periods
return an Array so you can't do things like:as there is no find_by method on Array.
Proposed Solution
Change
where
to return a Collection.Acceptance Criteria
This code works:
Not Required
Prerequisites
Related Issues