amatriain/feedbunch

View on GitHub
FeedBunch-app/app/views/devise/confirmations/new.html.erb

Summary

Maintainability
Test Coverage
<% content_for :heading do %>
  <%= t 'devise.views.resend_confirmation' %>
<% end %>

<% cache "devise_confirmations_new-#{I18n.locale}" do %>

  <div class="row">

    <div class="col-xs-12 col-md-8">
      <%= simple_form_for resource,
                          :as => resource_name,
                          :url => user_confirmation_path(locale: I18n.locale),
                          authenticity_token: '',   # Rails unobtrusive-JS will set the correct value from the meta tag in head,
                                                    # this way this form can be cached and still send the correct token when POSTing.
                          html: {:method => :post} do |f| %>
        <%= f.input :email, as: :email_icon, autofocus: true %>

        <div class="form-group">
          <div class="col-xs-12 col-sm-9 col-sm-offset-3">
            <%= button_tag type: 'submit', class: 'btn btn-primary btn-lg' do %>
              <i class="fa fa-share"></i> <%= t 'devise.views.resend_confirmation' %>
            <% end %>
          </div>
        </div>
      <% end %>
    </div>

<% end %>

    <div class="col-xs-12 col-md-4 col-sm-offset-3 col-md-offset-0">
      <%= render 'devise/shared/links' %>
    </div>
  </div>