Cleanup gitignore.
Modification of relations controller with specs.

Created by @reedkevin88 and @futhr based on sqashed and fixed commit
#d753ced