Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleanup UI and improve email

  • Loading branch information...
commit 4fd559f36c7072a86f7b131c69b9fce6d2977f70 1 parent 35ebf78
Mike Subelsky authored
4 app/mailers/proposal_mailer.rb
... ... @@ -1,5 +1,7 @@
1 1 class ProposalMailer < ActionMailer::Base
2   - default from: "speak@ignitebaltimore.com"
  2 + speak_addr = "Ignite Baltimore <speak@ignitebaltimore.com>"
  3 + default from: speak_addr
  4 + default "reply-to" => speak_addr
3 5
4 6 def confirmed_email(proposal)
5 7 @proposal = proposal
1  app/models/proposal.rb
@@ -22,6 +22,7 @@ class Proposal < ActiveRecord::Base
22 22 validates_presence_of :title, :description, :email, :bio, :speaker_name, allow_blank: false
23 23 validates :description, length: { maximum: 1000 }
24 24 validates :bio, length: { maximum: 100 }
  25 + validates :speaker_name, :title, :email, :phone, :website, length: { maximum: 254 }
25 26
26 27 before_create :save_hash_code
27 28
14 app/views/proposals/_form.html.haml
... ... @@ -1,12 +1,12 @@
1 1 .span12
2 2 = simple_form_for proposal, html: { class: 'form-vertical' }, defaults: { input_html: { class: 'span6' } } do |f|
3   - = f.input :speaker_name, label: "Your name", required: true
4   - = f.input :email, label: "Your email address", required: true
5   - = f.input :title, label: "Title of your talk", required: true
6   - = f.input :description, label: "Brief description of your talk (1000 characters maximum)", required: true
7   - = f.input :bio, label: "A one sentence biographical description of your background (100 characters maximum).", required: true
8   - = f.input :website, label: "Your website URL, if any", required: false
9   - = f.input :phone, label: "Daytime phone number", required: false
  3 + = f.input :speaker_name, label: "Your name", required: true, input_html: { maxlength: 254 }
  4 + = f.input :email, label: "Your email address", required: true, input_html: { maxlength: 254 }
  5 + = f.input :title, label: "Title of your talk", required: true, input_html: { maxlength: 254 }
  6 + = f.input :description, label: "Brief description of your talk (1000 characters maximum)", required: true, input_html: { maxlength: 1000, rows: 8 }
  7 + = f.input :bio, label: "A one sentence biographical description of your background (100 characters maximum).", required: true, input_html: { maxlength: 100, rows: 1 }
  8 + = f.input :website, label: "Your website URL, if any", required: false, input_html: { maxlength: 254 }
  9 + = f.input :phone, label: "Daytime phone number", required: false, input_html: { maxlength: 254 }
10 10
11 11 .actions
12 12 = f.button :submit, value: "Save Proposal", class: "btn btn-primary"
5 spec/models/proposal_spec.rb
@@ -24,6 +24,11 @@
24 24 proposal.hash_code.should == "0c71da6154"
25 25 end
26 26
  27 + it { should ensure_length_of(:speaker_name).is_at_most(254) }
  28 + it { should ensure_length_of(:title).is_at_most(254) }
  29 + it { should ensure_length_of(:email).is_at_most(254) }
  30 + it { should ensure_length_of(:phone).is_at_most(254) }
  31 + it { should ensure_length_of(:website).is_at_most(254) }
27 32 it { should ensure_length_of(:description).is_at_most(1000) }
28 33 it { should ensure_length_of(:bio).is_at_most(100) }
29 34 end

0 comments on commit 4fd559f

Please sign in to comment.
Something went wrong with that request. Please try again.