added scope param to has_many and habtm association overrides for rails 4