class IshModels::UserProfile
Constants
- ROLES
Public Class Methods
list()
click to toggle source
manager uses it. @TODO: check this, this is shit. vp 20170527
# File lib/ish_models/user_profile.rb, line 54 def self.list out = self.all.order_by( :domain => :asc, :lang => :asc ) [['', nil]] + out.map { |item| [ item.name, item.id ] } end
Public Instance Methods
current_order()
click to toggle source
# File lib/ish_models/user_profile.rb, line 65 def current_order self.orders.where( :submitted_at => nil ).first || CoTailors::Order.create( :profile => self ) end
sudoer?()
click to toggle source
# File lib/ish_models/user_profile.rb, line 48 def sudoer? %w( piousbox@gmail.com victor@wasya.co ).include?( self.user.email ) ? true : false end