Better support for rails4 associations.
Get rid of rails 4 deprecation warnings.