codeforboston / legalhousing

MIT License
10 stars 27 forks source link

When a listing is saved, check if discriminatory #134

Closed jmartini closed 7 years ago

jmartini commented 7 years ago

Addresses issue #128

Every time a listing model is saved, we will check if the record is "illegal" and updates the discriminatory flag in the listing model. The illegal? method currently will create a PhraseListing entry when it finds the listing is considered illegal. We probably want to look into a way that makes sure to remove this entry from the PhraseLisiting table if the offending phrase is removed from the Listing entry

Joshhw commented 7 years ago

did you end up making something to remove the listing if the phrasing is incorrectly labeled? we could probably do it with a new table and just add entries to be removed and run a rake command.