Created
June 4, 2013 01:39
-
-
Save ascruggs/5702974 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
desc 'add achievement to user' | |
params do | |
requires :id, type: String, desc: "Status ID." | |
requires :achievement_id, type: String, desc: "Achievement id you want to add" | |
end | |
put ':id' do | |
user = User.find params[:id] | |
achievement = Achievement.find params[:achievement_id] | |
user.achievements << achievement | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment