Sha256: 7ad8af959c49726e32d390620ae019175bf6556db48b3869c0a4febcedc2dec4

Contents?: true

Size: 436 Bytes

Versions: 3

Compression:

Stored size: 436 Bytes

Contents

module ProfileFieldTypes

  # Email Contact Information
  #
  class Email < ProfileField
    validates_format_of :value, :with => Devise::email_regexp, :if => Proc.new { |pf| pf.value.present? }
    
    def self.model_name; ProfileField.model_name; end

    def display_html
      mail = self.value || ""
      if mail == "—"
        mail
      else
        ActionController::Base.helpers.mail_to mail
      end
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
your_platform-1.0.1 app/models/profile_field_types/email.rb
your_platform-1.0.0 app/models/profile_field_types/email.rb
your_platform-0.0.2 app/models/profile_field_types/email.rb