Supports Rails 4.1 inversible associations

Still a bit of a work in progress, but this is my proposed strategy for now

Fixes #895