Added correct relationship modeling with activerecord