Used Rails 4 association spec
More Rails 4 fixes
Extracted methods
Merge branch 'master' into original-modifications