Skip to content
Snippets Groups Projects
Commit fa092670 authored by smayer's avatar smayer
Browse files

Update dataset_controller.rb for correct redirects after deleting an article from a dataset

parent 0dee7f19
No related branches found
No related tags found
1 merge request!2Merging development into onb as preparation for Annolyzer release
......@@ -142,7 +142,6 @@ class DatasetController < ApplicationController
def add_compound
out = {}
dataset = Dataset.find(session[:working_dataset])
# dataset = Dataset.find(params[:working_dataset])
existing = dataset.add_compound params[:compound_id] # Add docs and return existing ids
title = dataset.title
message = "<p> The compound article was added to your dataset.</p>"
......@@ -160,7 +159,8 @@ class DatasetController < ApplicationController
puts "Remove selected documents called, session has working dataset with id " + String(session[:working_dataset])
dataset = Dataset.find(session[:working_dataset])
dataset.remove_documents params[:documents_ids]
redirect_to action: "show", id: dataset.id
puts request.host, request.port, request.url, request.original_fullpath
redirect_to "http://127.0.0.1:8001/en/tool/newspapers-platform/dataset/#{dataset.id}", id: dataset.id
end
def add_all_documents
......
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