Sha256: a68d09d2693c710676b3516f9503e1a986189ec1dc00426177893207a00b28c4

Contents?: true

Size: 512 Bytes

Versions: 16

Compression:

Stored size: 512 Bytes

Contents

class Inquiry < ActiveRecord::Base

  validates_presence_of :name
  validates_format_of :email,
                      :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i,
                      :message => 'must be valid'

  acts_as_indexed :fields => [:name, :email, :message, :phone],
                  :index_file => [Rails.root.to_s, "tmp", "index"]

  default_scope :order => 'created_at DESC'

  named_scope :closed, :conditions => {:open => false}
  named_scope :open, :conditions => {:open => true}

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
refinerycms-0.9.6.31 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.30 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.29 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.28 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.27 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.26 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.25 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.24 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.23 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.22 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.21 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.19 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.18 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.17 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.16 vendor/plugins/inquiries/app/models/inquiry.rb
refinerycms-0.9.6.15 vendor/plugins/inquiries/app/models/inquiry.rb