everypolitician / everypolitician-popolo

Ruby gem for interacting with EveryPolitician data for a legislature
MIT License
7 stars 4 forks source link

remove the overridden initialize method from Event #107

Closed struan closed 8 years ago

struan commented 8 years ago

Event had its own initialize method which was not setting @popolo, this meant that code using .popolo on Events would break with an undefined method 'memberships' for nil:NilClass type error.

This removes the overridden initialize and restores the default behaviour.

Fixes the build error in https://github.com/everypolitician/everypolitician-data/pull/18542 which was caused by Everypolitician::DataView::Terms.term_memberships trying to access popolo.memberships.