The pull request with all the code.

Ternary statements in the views should be extracted to a helper. Ternaries are very commonly used and extremely useful. This is why they are included in Ruby.