Skip to content

Instantly share code, notes, and snippets.

@braidn
Created October 6, 2014 13:20
Show Gist options
  • Save braidn/b02c7ecb6ab8ecd65f30 to your computer and use it in GitHub Desktop.
Save braidn/b02c7ecb6ab8ecd65f30 to your computer and use it in GitHub Desktop.
Ransack it
@all_products = @taxon.products.ransack(params[:q], available: true).result
@all_products = @taxon.products.ransack(params[:q]).result
@all_products.select! {|p| p.available? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment