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