Hello, I have a rails app with authentication with Omniauth.
I have a page with link_to links to actions.
If user not logged in, he need to authenticate with Omniauth and go to
action.
for example code:
<% if current_user %>
<%= link_to ‘Action’,{:controller => ‘my_controller’, :action =>
‘my_action’},:
<% else %>
<%= link_to “Action”,’/auth/twitter/’ %>
<% end %>
How to say my sessions#create action(who processes
/auth/:provider/callback/) that i need after authentication redirect
user to my_action?
I try to use
<%= link_to “Action”,’/auth/twitter/’ , session[:from_this_page]
=> true %>
this construction , but in sesstions controller
session[:from_this_page] is nil.