Skip to content

Instantly share code, notes, and snippets.

@everm1nd
Created August 11, 2015 13:32
Show Gist options
  • Save everm1nd/533d17e3292d81df245c to your computer and use it in GitHub Desktop.
Save everm1nd/533d17e3292d81df245c to your computer and use it in GitHub Desktop.
How to disable some select options in SimpleForm association
# map(&:id) is important to make this work
= f.association :stuff, disabled: Stuff.where(enabled: false).map(&:id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment