Imagine we have a book model and chapter model. Both models have attributes that needs to have sanitized html. We use a gem called sanitizer
to sanitize the text. Now how would you refactor this code to be more DRY and scalable? Bonus: How would you test this?
- Clone the gist
- Modify the code (change these files or add your own)
- Save your modifications as a forked gist
- Respond to the Breezy email with a link to your gist