Skip to content

Instantly share code, notes, and snippets.

@daviddavis
Created July 3, 2013 21:05
Show Gist options
  • Select an option

  • Save daviddavis/5922824 to your computer and use it in GitHub Desktop.

Select an option

Save daviddavis/5922824 to your computer and use it in GitHub Desktop.
def available_subscriptions
all_pools = retrieve_all_pools
available_pools = retrieve_available_pools(all_pools).sort
products = @activation_key.content_view ? @activation_key.content_view.products(@environment) : @environment.products
@available_pools = @available_pools.select { |pool| products.any? { |product| product.name == pool[:name] } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment