Skip to content

Commit 105261e

Browse files
Work toward out-bound link tracker for ab testing
1 parent 7b54d72 commit 105261e

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

app/controllers/record_controller.rb

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ class RecordController < ApplicationController
33

44
include RecordHelper
55

6+
def out
7+
url = params[:url]
8+
end
9+
610
def view
711
id = params[:id]
812
index = ENV.fetch('TIMDEX_INDEX', nil)

app/controllers/search_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ def results
55
# if we are loading results, the user submitted the form - so this experiment is finished
66
ab_finished(:ui_colors)
77

8+
# ab_test(:result_format)
9+
810
# hand off to Enhancer chain
911
@enhanced_query = Enhancer.new(params).enhanced_query
1012

app/views/record/out.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>This would redirect you.</p>

config/routes.rb

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
get 'issn', to: 'fact#issn'
88
get 'pmid', to: 'fact#pmid'
99

10+
get 'out/(:url)', to: 'record#out'
1011
get 'record/(:id)',
1112
to: 'record#view',
1213
as: 'record',

0 commit comments

Comments
 (0)