app/models/refinery/contacts/contact.rb in refinerycms-contacts-0.1.2 vs app/models/refinery/contacts/contact.rb in refinerycms-contacts-0.2.0

- old
+ new

@@ -1,17 +1,13 @@ module Refinery module Contacts class Contact < Refinery::Core::BaseModel has_many :mails - default_scope order("position DESC") + default_scope -> {order("position DESC")} accepts_nested_attributes_for :mails, :allow_destroy => true self.table_name = 'refinery_contacts' - - attr_accessible :title, :street, :city, :zip_code, :homepage, :company, :province, :country, :tel1, :tel2, :tel3, :fax, :position, :mails_attributes - - acts_as_indexed :fields => [:title, :street, :city, :zip_code, :province, :country, :tel1, :tel2, :tel3, :fax] validates :title, :presence => true, :uniqueness => true validates_format_of :homepage, :with => URI.regexp(['http','https']), :allow_blank => true end end