danilolsoares

Untitled

Nov 18th, 2019
486
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class ApplicationController < ActionController::Base
  2.     before_action :validate_token
  3.  
  4.     def validate_token
  5.         token = params[:token]
  6.         email = params[:email]
  7.         token_ok = false
  8.         if token.present? and email.present?
  9.             token_ok = #Chamada para o metodo validador de token na autenticacao
  10.         end
  11.         redirect('login') unless token_ok
  12.     end
  13. end
RAW Paste Data