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
| # ruby beginner elevator program | |
| # We might break this stuff up into more classes as the need to separate state and | |
| # behaviour of different entities emerges, for now we keep it simple and imagine | |
| # the state to be that of the building as a whole. | |
| # | |
| class Building | |
| GROUND_FLOOR = 0 |
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
| # Used to modify the relationship tags applied to the specified contact | |
| # | |
| # PUT /users/bob/contacts/alice/tags?friend=t&family=f | |
| # | |
| # Sets the tags on the relationship that 'bob' has with 'alice' to be 'friend' and not 'family' | |
| # | |
| def tags | |
| @contact = user.contacts.with_login( params[:id] ) | |
| @relationship = user.relationships.with( @contact ) | |
| @relationship.set( tags_from_params( params ) ) |
NewerOlder