Skip to content

Instantly share code, notes, and snippets.

@creativereason
Created August 8, 2012 23:00
Show Gist options
  • Save creativereason/3299581 to your computer and use it in GitHub Desktop.
Save creativereason/3299581 to your computer and use it in GitHub Desktop.
lead...
class Lead < ActiveRecord::Base
attr_accessible :address, :city, :company, :email, :job_title, :name, :phone_number, :state
validates :name, :presence => true
validates :email, :presence => true, :format => { :with => /\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+\z/,
:message => "Valid email only" }
validates :company, :presence => true
end
@excid3
Copy link

excid3 commented Aug 8, 2012

I'm missing the p in the content_tag.

@excid3
Copy link

excid3 commented Aug 8, 2012

Also the escape_javascript might make sense wrapping the content_tag instead too, I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment