Sha256: 7907194a5a7070a19bc999baa622f5c9bb670fd2e0c640e69a85fc3732c9dd7b

Contents?: true

Size: 902 Bytes

Versions: 10

Compression:

Stored size: 902 Bytes

Contents

<%= form_for(@subscription) do |f| %>
  <% if @subscription.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@subscription.errors.count, "error") %> prohibited this subscription from being saved:</h2>

      <ul>
      <% @subscription.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :email %><br>
    <%= f.text_field :email %>
  </div>

	<%
		random_number_1 = rand(4)+1
		random_number_2 = rand(4)+1
	%>
	<div class="field">
		<%= label "antispam", "answer", "Spam bots can't do math. What is #{random_number_1} + #{random_number_2}?" %><br />
		<%= text_field "antispam", "answer" %><br />
		<%= hidden_field "antispam", "solution", value: random_number_1+random_number_2 %>
	</div>

  <div class="actions">
    <%= f.submit "Subscribe" %>
  </div>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
proclaim-0.3.1 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.3.0 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.2.4 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.2.2 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.2.1 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.2.0 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.1.3 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.1.2 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.1.1 app/views/proclaim/subscriptions/_form.html.erb
proclaim-0.1.0 app/views/proclaim/subscriptions/_form.html.erb