Created
March 24, 2017 13:00
-
-
Save Dysp/7fc00733afb12dc4232a573685eb1b28 to your computer and use it in GitHub Desktop.
This file contains 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
Showing D:/studmed/studmed/app/views/illnesses/_form.html.erb where line #49 raised: | |
undefined method `id' for #<Illness::ActiveRecord_Relation:0x0000000c9c1f60> | |
Did you mean? ids |
This file contains 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
def get_differential_diagnoses | |
differential_diagnoses = [] | |
CATEGORIES.each do |category| | |
differential_diagnoses << Illness.where(category: category) | |
end | |
differential_diagnoses | |
end |
This file contains 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
<%= select_tag 'differential_id', options_from_collection_for_select(@differential_diagnoses, 'id', 'name'), prompt: "Vælg differential diagnoser", class: 'form-control', multiple: true %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment