Sha256: a0627c6c8d9ce96ea062cdb38f9e33fa8f29e52a9ac60405c3d781ac5105e2c8

Contents?: true

Size: 526 Bytes

Versions: 14

Compression:

Stored size: 526 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

  validates_presence_of :sender_name
  validates_presence_of :sender_email
  # validates :sender_email, :presence => true, :format => { :with => /\A([\A@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :on => :create }
  validates_presence_of :body

  scope :by_recent, -> { order('updated_at desc') }

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
tkh_content-0.10.3 app/models/contact.rb
tkh_content-0.10.2 app/models/contact.rb
tkh_content-0.10.1 app/models/contact.rb
tkh_content-0.10 app/models/contact.rb
tkh_content-0.9.20 app/models/contact.rb
tkh_content-0.9.19 app/models/contact.rb
tkh_content-0.9.18 app/models/contact.rb
tkh_content-0.9.17 app/models/contact.rb
tkh_content-0.9.16 app/models/contact.rb
tkh_content-0.9.15 app/models/contact.rb
tkh_content-0.9.14 app/models/contact.rb
tkh_content-0.9.13 app/models/contact.rb
tkh_content-0.9.12 app/models/contact.rb
tkh_content-0.9.11 app/models/contact.rb