Skip to content
Snippets Groups Projects
Commit 4f0f2513 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

change subjects for topics

parent fab875a4
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ class LearningObjectsController < ApplicationController
def new
@learning_object = LearningObject.new
@school_levels = ['Educação Infantil', 'Ensino Fundamental', 'Ensino Médio']
@subjects = Topic.defaults
@topics = Topic.defaults
@types = LearningObject.default_types
@languages = Language.all
end
......@@ -33,7 +33,7 @@ class LearningObjectsController < ApplicationController
# POST /learning_objects.json
def create
@draft = LearningObject::Draft.new(learning_object_params)
@draft.subjects = build_subjects learning_object_params[:subjects]
@draft.topics = build_subjects learning_object_params[:topics]
@draft.publisher = current_user
publisher = LearningObjectPublisher.new(DspaceService.create_client)
......
......@@ -46,9 +46,9 @@
<br>
</div>
<%= f.label :subjects, 'Assuntos' %>
<%= f.label :topics, 'Assuntos' %>
<select id='subjectSelect' name="learning_object[subjects][]" multiple>
<%= @subjects.each do |subject| %>
<%= @topics.each do |subject| %>
<option value='<%= subject.id %>'><%= subject.name %></option>
<% end %>
</select>
......
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