Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- before_action :validate_token
- def validate_token
- token = params[:token]
- email = params[:email]
- token_ok = false
- if token.present? and email.present?
- token_ok = #Chamada para o metodo validador de token na autenticacao
- end
- redirect('login') unless token_ok
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement