unepwcmc/SAPI — pull request #52 by agnessa (2013-07-01 10:15:22+00:00)
Title: Legislation cascading

-> in order to test the changes you need to run the migrations and this rake task:
rake db:migrate:rebuild_listing_changes_mview
-> extended the listing changes mview to include inherited listing changes as well as explicit ones
-> added flags:
show_in_history -- whether to show on the species + website
show_in_downloads - whether to include in history pdf (and other history downloads)
show_in_timelines - whether to show on the checklist timelines
These flags should be used instead of relying on the explicit_change or change type <> EXCEPTION conditions
-> added auto_notes to inherited listing changes, e.g. '[Family listing: xxx spp]' - these show in checklist timelines annotations and species+ website
-> also changed the way timelines json is returned to use ActiveModel Serializer
-> replaced the cites/eu_listing_changes associations by methods, because they were breaking the universe
-> the expected outputs are described in length in the Legiclation Rules document in dropbox