Skip to content

Instantly share code, notes, and snippets.

@Dysp
Created March 24, 2017 13:00
Show Gist options
  • Save Dysp/7fc00733afb12dc4232a573685eb1b28 to your computer and use it in GitHub Desktop.
Save Dysp/7fc00733afb12dc4232a573685eb1b28 to your computer and use it in GitHub Desktop.
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
def get_differential_diagnoses
differential_diagnoses = []
CATEGORIES.each do |category|
differential_diagnoses << Illness.where(category: category)
end
differential_diagnoses
end
<%= 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