Implemented the setter method for has_many