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
Branches
No related tags found
1 merge request!2Merging development into onb as preparation for Annolyzer release
...@@ -142,7 +142,6 @@ class DatasetController < ApplicationController ...@@ -142,7 +142,6 @@ class DatasetController < ApplicationController
def add_compound def add_compound
out = {} out = {}
dataset = Dataset.find(session[:working_dataset]) 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 existing = dataset.add_compound params[:compound_id] # Add docs and return existing ids
title = dataset.title title = dataset.title
message = "<p> The compound article was added to your dataset.</p>" message = "<p> The compound article was added to your dataset.</p>"
...@@ -160,7 +159,8 @@ class DatasetController < ApplicationController ...@@ -160,7 +159,8 @@ class DatasetController < ApplicationController
puts "Remove selected documents called, session has working dataset with id " + String(session[:working_dataset]) puts "Remove selected documents called, session has working dataset with id " + String(session[:working_dataset])
dataset = Dataset.find(session[:working_dataset]) dataset = Dataset.find(session[:working_dataset])
dataset.remove_documents params[:documents_ids] 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 end
def add_all_documents def add_all_documents
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment