moves letter verification to letter controller

This commit is contained in:
rgarcia
2015-10-19 19:37:16 +02:00
parent fd8684e713
commit a6fd1fb489
3 changed files with 31 additions and 4 deletions

View File

@@ -1,11 +1,13 @@
class Verification::LetterController < ApplicationController class Verification::LetterController < ApplicationController
before_action :authenticate_user! before_action :authenticate_user!, except: :edit
before_action :verify_resident! before_action :verify_resident!
before_action :verify_phone! before_action :verify_phone!
before_action :verify_verified! before_action :verify_verified!
before_action :verify_lock before_action :verify_lock
skip_authorization_check skip_authorization_check
layout :pages, only: :edit
def new def new
@letter = Verification::Letter.new(user: current_user) @letter = Verification::Letter.new(user: current_user)
end end
@@ -20,7 +22,7 @@ class Verification::LetterController < ApplicationController
end end
def edit def edit
@letter = Verification::Letter.new(user: current_user) @letter = Verification::Letter.new
end end
def update def update

View File

@@ -1 +1,27 @@
<div class="row verify">
<div class="small-12 medium-8 small-centered column">
<div class="text-center">
<h1>
<i class="icon-check"></i>
<%= t("pages.verify.title") %>
</h1>
<p><%= t("pages.verify.info") %></p>
</div>
<div class="medium-6 small-centered column">
<form>
<label><%= t("pages.verify.email") %></label>
<input type="text" placeholder="<%= t("pages.verify.email") %>">
<label><%= t("pages.verify.password") %></label>
<input type="password" placeholder="<%= t("pages.verify.password") %>">
<label><%= t("pages.verify.code") %></label>
<input type="text" placeholder="<%= t("pages.verify.code") %>">
<input type="submit" value="<%= t("pages.verify.submit") %>" class="button radius success expand">
</form>
</div>
</div>
</div>

View File

@@ -270,6 +270,5 @@ Rails.application.routes.draw do
get "/participation_world", to: "pages#participation_world" get "/participation_world", to: "pages#participation_world"
get "/blog", to: "pages#blog" get "/blog", to: "pages#blog"
get "/accessibility", to: "pages#accessibility" get "/accessibility", to: "pages#accessibility"
get "/verifica", to: "pages#verify" get "/verifica", to: "verification/letter#edit"
end end