1

(rails 4, ruby 2.0, excel for osx 14.5, but same problem detected in windows excel) I have a link in excel that looks like:

https://www.example.com/reports/download_frame/1481

When the user clicks in excel they get routed to the default home page. When they cut and paste the same url into a browser it works fine, and they go direct to the page.

On apache, this is what the log looks like:

- - - [14/Jun/2015:15:41:44 -0400] "OPTIONS /reports/download_frame/ HTTP/1.1" 404 1564 "-" "Microsoft Office Protocol Discovery" -
- - - [14/Jun/2015:15:41:45 -0400] "GET /reports/download_frame/1481 HTTP/1.1" 302 106 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X) Excel/14.50.0" -
- - - [14/Jun/2015:15:41:45 -0400] "GET /users/sign_in HTTP/1.1" 200 4148 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X) Excel/14.50.0" -
- - - [14/Jun/2015:15:41:46 -0400] "GET /users/sign_in HTTP/1.1" 302 93 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0" -
- - - [14/Jun/2015:15:41:46 -0400] "GET / HTTP/1.1" 200 6772 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0" -

I am not sure what the first call is doing, but the 2nd should be correct. It seems like devise is auto logging them in, but forgetting the original url. If they are already logged in, shouldn't it just work on the first try?

Joelio
  • 4,621
  • 6
  • 44
  • 80

2 Answers2

0

Use the rememberable devise module to remember your users when they are connected.

Check the documentation here: http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Models/Rememberable

Nathan Schwarz
  • 631
  • 5
  • 19
  • Hi, thanks, I already do, and it works fine under normal circumstances...just not coming from excel...I think it is because some of the requests are coming from excel and some from firefox and it is confusing devise. – Joelio Jun 15 '15 at 11:56
0

I found this after I posted, worded differently, but same issue, the first answer was a workaround to my problem.

Excel links not loading pages, but when the link is pasted in the browser it works.

Community
  • 1
  • 1
Joelio
  • 4,621
  • 6
  • 44
  • 80