assemblymade/coderwall — pull request #234 by YaroSpace (2014-10-26 11:16:10+00:00)
Title: Join team error #391

**This PR is reabased against current master, so it will fix any issues introduced by previous PRs on this bounty**

[Fix for Error when attempting to join a team instead of create a team #391] (https://assembly.com/coderwall/bounties/391)

The fix was a one liner - incorrect format of params, which caused `params.permit` to raise a 400 error.

I covered the related logic with specs and featurs and also did a little refactoring to make it easier to test and to understand the logic.

Changes:

- add params flags `:show_similar` and `:join_team` to clarify user intentions
- extracted `#with_similar_names` to Team model method
- added notification on success/failure of team creation
- minor css fix to render payment boxes of equal height
- minor fix to `UsernamesController` when validation is run against an empty user name
-added `poltergeist` headless browser for integration testing with feature specs (**will require `phantomjs` executable to be added to the vagrant box)

![coderwall com establishing geek cred since 1305712800](https://cloud.githubusercontent.com/assets/5670940/4782690/2f9fb956-5d01-11e4-9b25-562f940b7466.png)
![error](https://cloud.githubusercontent.com/assets/5670940/4782696/6f7ca76e-5d01-11e4-98a8-d4d99d9bc6b4.png)