verify.html is back

pull/395/head
Rick Carlino 2017-08-10 14:34:05 -05:00
parent ef89ce03e3
commit 4c88b92528
5 changed files with 14 additions and 4 deletions

View File

@ -5,7 +5,7 @@ class DashboardController < ApplicationController
TOS_URL: ENV.fetch("TOS_URL", ""),
LONG_REVISIONL: LONG_REVISION,
SHORT_REVISION: LONG_REVISION.first(8) }.to_json
[:main_app, :front_page, :tos_update].map do |action|
[:main_app, :front_page, :tos_update, :verify].map do |action|
define_method(action) { render action, layout: false }
end

View File

@ -4,7 +4,7 @@ class UserMailer < ApplicationMailer
@user_name = user.name
@the_url = "http:" +
$API_URL +
"/verify.html?token=" +
"/verify?token=" +
user.verification_token
throw "Bad registration?" unless @the_url.present?
mail(to: @user.email, subject: 'Welcome to The FarmBot Web App!')

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<%= render "common_assets" %>
</head>
<body>
<%= javascript_include_tag *webpack_asset_paths("verification") %>
</body>
</html>

View File

@ -1,6 +1,5 @@
<h1>Welcome to FarmBot, <%= @user_name %></h1>
<p>
Please verify your email by clicking here
<a href="<%= @the_url %>">here</a>.<br>
Please verify your email by clicking <a href="<%= @the_url %>">here</a>.<br>
</p>
<p>Thanks for joining and have a great day!</p>

View File

@ -50,4 +50,6 @@ FarmBot::Application.routes.draw do
via: :all
get "/password_reset/:token" => 'dashboard#password_reset',
as: :password_reset
get "/verify" => 'dashboard#verify',
as: :verify
end