Created
February 24, 2016 17:05
-
-
Save johnhamelink/fdea84282ec6536ac8c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if play.players.find_by_session_id(current_user.id) | |
| return uhoh!('Player with session ID is already on the play roster', 409) | |
| end | |
| player = play.players.new( | |
| session_id: current_user.id, | |
| origin: 'Session', | |
| state: Player.states[:requested_to_join], | |
| name: current_user.name | |
| ) | |
| UpdatePlayerService.new.create( | |
| current_user: current_user, | |
| player: player | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment