Skip to content

Commit 8f87cd7

Browse files
Work toward out-bound link tracker for ab testing
1 parent ee0dbe9 commit 8f87cd7

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-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/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)