Created
August 11, 2015 13:32
-
-
Save everm1nd/533d17e3292d81df245c to your computer and use it in GitHub Desktop.
How to disable some select options in SimpleForm association
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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