Sha256: c562f0caa4bcb63c855e0e02695974a7e0b7aba13062e334183d3c1958f79ea9

Contents?: true

Size: 486 Bytes

Versions: 13

Compression:

Stored size: 486 Bytes

Contents

class Wco::Profile
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'ish_user_profiles'

  field :email
  index({ email: 1 }, { name: 'email' })
  validates :email, presence: true, uniqueness: true

  field :per_page, type: :integer, default: 25

  belongs_to :leadset, class_name: 'Wco::Leadset', inverse_of: :profile, optional: true

  has_many :newsitems, class_name: 'Wco::Newsitem'

  def self.list
    all.map { |p| [ p.email, p.id ] }
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ish_models-3.1.0.29 app/models/wco/profile.rb
ish_models-3.1.0.28 app/models/wco/profile.rb
ish_models-3.1.0.27 app/models/wco/profile.rb
ish_models-3.1.0.26 app/models/wco/profile.rb
ish_models-3.1.0.25 app/models/wco/profile.rb
ish_models-3.1.0.24 app/models/wco/profile.rb
ish_models-3.1.0.23 app/models/wco/profile.rb
ish_models-3.1.0.22 app/models/wco/profile.rb
ish_models-3.1.0.21 app/models/wco/profile.rb
ish_models-3.1.0.20 app/models/wco/profile.rb
ish_models-3.1.0.19 app/models/wco/profile.rb
ish_models-3.1.0.18 app/models/wco/profile.rb
ish_models-3.1.0.17 app/models/wco/profile.rb