Using before_action :authenticate_user! to check if user logged in. But it sends users to login instead of signup.
before_action :authenticate_user!
login
signup
Tried different
store_location_for
Like
before_filter :auth_user def auth_user unless user_signed_in? store_location_for(:user, request.fullpath) redirect_to new_user_registration_url end end