Last active
December 23, 2015 19:19
-
-
Save furu/6681296 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
# こういうの迷う | |
get '/foo' do | |
return '' unless User.exists?(id: params[:id]) | |
# 以下処理... | |
response | |
end | |
get '/foo' do | |
if User.exists?(id: params[:id]) | |
# 何か処理... | |
return response | |
else | |
return '' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment