Sha256: 0fbffff870ddb221d51b40ed0d5bbb913c7fbcef1f1ed76a258a91bed0f0df52
Contents?: true
Size: 1011 Bytes
Versions: 19
Compression:
Stored size: 1011 Bytes
Contents
module GraphqlDevise module MailerHelper def confirmation_query(resource_name:, token:, redirect_url:) name = "#{resource_name.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.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
19 entries across 19 versions & 1 rubygems