Skip to content

Instantly share code, notes, and snippets.

@LucoLe
LucoLe / _coding_challenge.md
Last active August 9, 2017 11:50 — forked from JohnBDonner/_coding_challenge.md
Coding Challenge

Description

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?

Directions:

  • 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