Skip to content

Instantly share code, notes, and snippets.

@drymar
Last active May 22, 2017 15:20
Show Gist options
  • Save drymar/c421033821ffa495f66f49a437c6cd0d to your computer and use it in GitHub Desktop.
Save drymar/c421033821ffa495f66f49a437c6cd0d to your computer and use it in GitHub Desktop.
def tickets
case
when filters.excel
range_tickets
when filters.avia_offset.present? == false
range_tickets[0..24]
when filters.from_postsale
range_tickets[0...filters.avia_offset]
else
range_tickets[filters.avia_offset..filters.avia_offset + 9] || []
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment