class RegistrationsController < Devise::RegistrationsController
  before_action :check_captcha
  protected

  def after_inactive_sign_up_path_for(resource)
     flash[:success] = "Congratulation! Your account has been Successfully created.Click on the link sent to your email to verify your account" 
    new_user_session_path
  end
 

  private
    def check_captcha
      if APPLICATION['defaults']['recaptcha']
        unless verify_recaptcha
          self.resource = resource_class.new sign_up_params
          respond_with_navigational(resource) { render :new }
        end 
      end
    end
 end
 
