Separate NilPattern in its own class file.
Untrack Code Climate test coverage files.
Move responsibility of dealing with associations from pdf controller to model.