Building pinterest in rails