Sha256: b66cb46815e965ebb5b27283037729bb17b1750aeea3886ad903728ae5f5ced5
Contents?: true
Size: 1.06 KB
Versions: 11
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module GraphqlDevise module MailerHelper def confirmation_query(resource_name:, token:, redirect_url:) name = "#{resource_name.underscore.tr('/', '_').camelize(:lower)}ConfirmAccount" raw = <<-GRAPHQL query($token:String!,$redirectUrl:String!){ #{name}(confirmationToken:$token,redirectUrl:$redirectUrl){ email } } GRAPHQL { query: raw.delete("\n").delete(' ').html_safe, variables: { token: token, redirectUrl: redirect_url } } end def password_reset_query(token:, redirect_url:, resource_name:) name = "#{resource_name.underscore.tr('/', '_').camelize(:lower)}CheckPasswordToken" raw = <<-GRAPHQL query($token:String!,$redirectUrl:String!){ #{name}(resetPasswordToken:$token,redirectUrl:$redirectUrl){ email } } GRAPHQL { query: raw.delete("\n").delete(' ').html_safe, variables: { token: token, redirectUrl: redirect_url } } end end end
Version data entries
11 entries across 11 versions & 1 rubygems