Created
August 8, 2012 23:00
-
-
Save creativereason/3299581 to your computer and use it in GitHub Desktop.
lead...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also the escape_javascript might make sense wrapping the content_tag instead too, I'm not sure.