Use where(…).count
Fix typo: change include to includes.
Update AR queries
Use Rails 4 compatible fork of default_value_for
Use modern AR API for counts
Remove unused null relation
Add class name for source_events
Replace uses of :conditions + .first
Rewrite deprecated find_all_by
Fix deprecations
Remove use of deprecated APIs
Update deprecated auto_discovery_link_tag
Replace find_all_x + size with where … count
Use PATCH in place of PUT
Try to fix Cat 4 series test