Created
July 6, 2012 10:09
-
-
Save oriolgual/3059354 to your computer and use it in GitHub Desktop.
to tap or not to tap?
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
def do_it(ids) | |
contacts = contact_finder(ids) | |
contacts = contacts.my_nice_scope if should_apply_nice_scope? | |
contacts | |
end |
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
def do_it(ids) | |
contact_finder(ids).tap do |contacts| | |
return contacts.my_nice_scope if should_apply_nice_scope? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 to the no_tap version