if you try to add multiple invalid memberships you'll get multiple red flash messages on the page.
you can put `page.replace_html "tab-content-memberships", :partial => 'users/memberships'` above this line to fix it.