Skip to content

Instantly share code, notes, and snippets.

@rubiety
Last active August 29, 2015 14:23
Show Gist options
  • Save rubiety/821c6f1818752ad63218 to your computer and use it in GitHub Desktop.
Save rubiety/821c6f1818752ad63218 to your computer and use it in GitHub Desktop.
Mile Optimization Example
» AwardChartEntry.first_class.between(Airport["SAN"], Airport["ICN"]).order("amount asc").map(&:name)
=> [
[0] "MileagePlus Mainland U.S., Alaska & Canada to North Asia Saver Award in First: 80000 miles one way on own metal",
[1] "Aeroplan Canada & Continental USA to Asia 1 ClassicFlight Award in First: 105000 miles one way",
[2] "MileagePlus Mainland U.S., Alaska & Canada to North Asia Saver Award in First: 120000 miles one way on partner metal",
[3] "Skypass North America to Korea Off Peak Award in First: 160000 miles round trip",
[4] "MileagePlus Mainland U.S., Alaska & Canada to North Asia Standard Award in First: 190000 miles one way on own metal",
[5] "MileagePlus Mainland U.S., Alaska & Canada to North Asia Standard Award in First: 190000 miles one way on partner metal",
[6] "Aeroplan Canada & Continental USA to Asia 1 ClassicFlight Award in First: 210000 miles round trip",
[7] "Skypass North America to Korea Peak Award in First: 240000 miles round trip"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment