Sha256: 42996bd671ba84cea961403d14b61f699f327d749d55be78870596da4aa7be9a

Contents?: true

Size: 442 Bytes

Versions: 1

Compression:

Stored size: 442 Bytes

Contents

module Refinery
  module Contacts
    class Contact < Refinery::Core::BaseModel
      has_many :mails
      default_scope -> {order("position DESC")}

      accepts_nested_attributes_for :mails, :allow_destroy => true

      self.table_name = 'refinery_contacts'

      validates :title, :presence => true, :uniqueness => true
      validates_format_of :homepage, :with => URI.regexp(['http','https']), :allow_blank => true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refinerycms-contacts-0.2.0 app/models/refinery/contacts/contact.rb