Skip to content
Snippets Groups Projects
Commit 010cfc4b authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

controller now receives the ids of the selected subjects


Signed-off-by: default avatarman13 <man13@inf.ufpr.br>
parent ce2de513
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,9 @@ class Subject
end
def self.default_list
['Arte', 'Biologia', 'Ciências', 'Educação Física', 'Filosofia', 'Física', 'Geografia', 'História', 'Matemática', 'Português', 'Química', 'Sociologia']
['Artes', 'Biologia', 'Ciências', 'Educação Física', 'Filosofia',
'Física', 'Geografia', 'História', 'Matemática', 'Língua Portuguesa', 'Química', 'Sociologia'].map do |subject|
new.subject_repository.find_by_name(subject)
end
end
end
......@@ -39,10 +39,10 @@
<% end %>
<br><br>
<%= f.label :subjects, "Assuntos (Selecione 1 ou mais assuntos)" %>
<%= f.label :subjects, 'Assuntos (Selecione 1 ou mais assuntos)' %>
<select id='subjectSelect' name="learning_object[subjects][]" multiple>
<%= @subjects.each do |subject| %>
<option value='<%= subject %>'><%= subject %></option>
<option value='<%= subject.id %>'><%= subject.name %></option>
<% end %>
</select>
<br><br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment