Fixed automatic inverse_of for models nested in module

First contribution to Rails. I was not entirely sure if I should re-use existing test models or create new ones for this specific example.

will this work properly if there is same model in different namespaces and/or no namespace?