def code= token
      @code = token

      address_verification_query = User::Identities::EmailVerification.address_verification.where(token: code)
      if @identity = User::Identities::Email.joins(:verifications).merge(address_verification_query).first
        @verification = identity.verifications.detect {|v| v.token == code}
      end
    end
def code= token
      @code = token

      address_verification_query = User::Identities::EmailVerification.address_verification.where(token: code)
      if @identity = User::Identities::Email.joins(:verifications).merge(address_verification_query).first
        @verification = identity.verifications.detect {|v| v.token == code}
      end
    end
def code = token @code = token address_verification_query = User :: Identities :: EmailVerification . address_verification . where ( token : code ) if @identity = User :: Identities :: Email . joins ( :verifications ) . merge ( address_verification_query ) . first @verification = identity . verifications . detect { | v | v . token == code } end end
FIXME: a lot of duplication with reset_password
FIXME : a lot of duplication with reset_password