assemblymade/coderwall

View on GitHub
app/views/protips/_cacheable_protip.html.haml

Summary

Maintainability
Test Coverage
- if get_uncached_version?(protip, mode)
  = render partial: 'protip', locals: { protip: protip, mode: mode, include_comments: include_comments, job: job }
- else
  - cache(['v2', 'protip', protip.public_id, protip.updated_at.min, protip.score], expires_in: 1.week) do
    = render partial: 'protip', locals: { protip: protip, mode: mode, include_comments: include_comments, job: job }