From 059d7acb9430e6d428e283a0a943f8c99c9878e9 Mon Sep 17 00:00:00 2001 From: Matthew Bernhardt Date: Mon, 8 Jan 2024 13:27:36 -0500 Subject: [PATCH] Work toward out-bound link tracker for ab testing --- app/controllers/record_controller.rb | 4 ++++ app/controllers/search_controller.rb | 2 ++ app/views/record/out.html.erb | 1 + config/routes.rb | 1 + 4 files changed, 8 insertions(+) create mode 100644 app/views/record/out.html.erb diff --git a/app/controllers/record_controller.rb b/app/controllers/record_controller.rb index 9ac8ea3d..89355224 100644 --- a/app/controllers/record_controller.rb +++ b/app/controllers/record_controller.rb @@ -3,6 +3,10 @@ class RecordController < ApplicationController include RecordHelper + def out + url = params[:url] + end + def view id = params[:id] index = ENV.fetch('TIMDEX_INDEX', nil) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 5e27b995..8387fbdb 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -5,6 +5,8 @@ def results # if we are loading results, the user submitted the form - so this experiment is finished ab_finished(:ui_colors) + # ab_test(:result_format) + # hand off to Enhancer chain @enhanced_query = Enhancer.new(params).enhanced_query diff --git a/app/views/record/out.html.erb b/app/views/record/out.html.erb new file mode 100644 index 00000000..6f617b94 --- /dev/null +++ b/app/views/record/out.html.erb @@ -0,0 +1 @@ +

This would redirect you.

\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index cb993b63..f48841b9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,7 @@ get 'issn', to: 'fact#issn' get 'pmid', to: 'fact#pmid' + get 'out/(:url)', to: 'record#out' get 'record/(:id)', to: 'record#view', as: 'record',