Created
March 6, 2015 23:58
-
-
Save lin/1a720acd702ad271e1f9 to your computer and use it in GitHub Desktop.
Better ruby
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 nil set value after || | |
| tweets = timeline.tweets || [] | |
| def sign_in | |
| current_session || sign_user_in | |
| end | |
| set_or_not_var ||= 2 | |
| options[:country] ||= 'us' | |
| # conditional return | |
| options[:path] = if list_name | |
| "/#{user_name}/#{list_name}" | |
| else | |
| "/#{user_name}" | |
| end | |
| # modules | |
| ActiveRecord::concern | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment