Sha256: d84593d9805d90a2254a7dbb35edb1e8b2867ad2fa3183608f3ed355b3fb9189

Contents?: true

Size: 530 Bytes

Versions: 22

Compression:

Stored size: 530 Bytes

Contents

# this is needed for now to make mass assignment security compatible with the translation of globalize3
Globalize::ActiveRecord::Translation.class_eval do
  attr_accessible :locale
end

class Contact < ActiveRecord::Base
  
  attr_accessible :sender_name, :sender_email, :body
  
  validates_presence_of :sender_name
  validates :sender_email, :presence => true, :format => { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :on => :create }
  validates_presence_of :body

  scope :by_recent, order('updated_at desc')
  
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
tkh_content-0.4.7 app/models/contact.rb
tkh_content-0.9.1 app/models/contact.rb
tkh_content-0.9 app/models/contact.rb
tkh_content-0.4.6 app/models/contact.rb
tkh_content-0.4.5 app/models/contact.rb
tkh_content-0.4.4 app/models/contact.rb
tkh_content-0.4.3 app/models/contact.rb
tkh_content-0.4.2 app/models/contact.rb
tkh_content-0.3.1 app/models/contact.rb
tkh_content-0.3 app/models/contact.rb
tkh_content-0.2.1 app/models/contact.rb
tkh_content-0.2 app/models/contact.rb
tkh_content-0.1.15 app/models/contact.rb
tkh_content-0.1.14 app/models/contact.rb
tkh_content-0.1.13 app/models/contact.rb
tkh_content-0.1.12 app/models/contact.rb
tkh_content-0.1.11 app/models/contact.rb
tkh_content-0.1.10 app/models/contact.rb
tkh_content-0.1.9.3 app/models/contact.rb
tkh_content-0.1.9.2 app/models/contact.rb