Added rails relationships.