Sha256: 3461b6ce8a0492c0ccc26e3bd79dc0d1e11f8c79dd50e0aaee5b081b3e4b279a

Contents?: true

Size: 825 Bytes

Versions: 11

Compression:

Stored size: 825 Bytes

Contents

class IshModels::UserProfile  
  include Mongoid::Document
  include Mongoid::Timestamps
  
  field :username, :type => String

  field :about, :type => String
  field :education, :type => String
  field :objectives, :type => String
  field :current_employment, :type => String
  field :past_employment, :type => String
  
  field :pdf_resume_path, :type => String
  field :doc_resume_path, :type => String
  
  field :lang, :type => String
 
  belongs_to :user

  has_many :galleries
  
  def manager?
    %w( piousbox@gmail.com manager@gmail.com ).include?( self.user.email ) ? true : false
  end

  # manager uses it.
  # @TODO: check this, this is shit. _vp_ 20170527
  def self.list
    out = self.all.order_by( :domain => :asc, :lang => :asc )
    [['', nil]] + out.map { |item| [ item.username, item.id ] }
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ish_models-0.0.33.20 lib/ish_models/user_profile.rb
ish_models-0.0.33.19 lib/ish_models/user_profile.rb
ish_models-0.0.33.18 lib/ish_models/user_profile.rb
ish_models-0.0.33.17 lib/ish_models/user_profile.rb
ish_models-0.0.33.16 lib/ish_models/user_profile.rb
ish_models-0.0.33.15 lib/ish_models/user_profile.rb
ish_models-0.0.33.14 lib/ish_models/user_profile.rb
ish_models-0.0.33.13 lib/ish_models/user_profile.rb
ish_models-0.0.33.12 lib/ish_models/user_profile.rb
ish_models-0.0.33.11 lib/ish_models/user_profile.rb
ish_models-0.0.33.10 lib/ish_models/user_profile.rb