check for habtm relationships in rails 4.0