Created
December 16, 2010 19:54
-
-
Save tsnow/743898 to your computer and use it in GitHub Desktop.
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
ruby-1.8.7-p302 > e = Ebates.first | |
ruby-1.8.7-p302 > first = e.current_protos.select{|i| i.rname =~ /shoe/i}[0] | |
"ShoeMall" "http://www.ebates.com/stores/shoemall.com.htm", cb: "8.0% " | |
ruby-1.8.7-p302 > dup = e.current_protos.select{|i| i.rname =~ /shoe/i}[11] | |
"ShoeMall" "http://www.ebates.com/stores/shoemall.com.htm", cb: "8.0% " | |
ruby-1.8.7-p302 > first.process | |
=> {:update_programs=>[], :created_ids=>[], :updated_ids=>[374513], :expired_ids=>[], :update_stores=>[]} | |
ruby-1.8.7-p302 > dup.process | |
=> {:update_programs=>[], :created_ids=>[], :updated_ids=>[374514], :expired_ids=>[], :update_stores=>[]} | |
Deal.find(374513) #=> NotFound since it was cycled by 'dup' and became 374514 | |
LegacyDeal.echo(Deal.find(374514)) | |
=> "374514, 8.0% cash back at ShoeMall from Ebates, 1962, 2010-12-16 19:39:01 UTC" | |
LegacyDeal.echo(ArchivedDeal.last) | |
"21553, 8.0% cash back at ShoeMall from Ebates, 1962, 2010-12-16 19:38:55 UTC" :new_deal_id => 374514 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment