polyglot/app/models/user.rb

15 lines
388 B
Ruby
Raw Normal View History

class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
has_many :connections
def contacts
self.connections.map do |connection|
connection.contact
end
end
end