Sha256: 6bd7e92e727377c76894982c453a6bcfe7b15ddfab7eaf23c38edfbfed854197
Contents?: true
Size: 486 Bytes
Versions: 8
Compression:
Stored size: 486 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 :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
8 entries across 8 versions & 1 rubygems