Created
July 7, 2011 21:54
-
-
Save ogredude/1070638 to your computer and use it in GitHub Desktop.
Is there a better way to do this?
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
# The goal is to end up with a list of items in the store that the user did NOT check. Items the user checked are in the params[:item_ids] array. | |
# There's got to be a better way... But how? | |
store.items.each do |i| | |
does_not_want << i.item_id unless params[:item_ids].include?(i.item_id) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment