Created
March 26, 2014 18:33
-
-
Save crossaidi/9790116 to your computer and use it in GitHub Desktop.
Inline rescue
This file contains 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
def set_name(params) | |
@name = params.fetch(:name) rescue 'Anonymous' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment