# frozen_string_literal: true # Usuarie de la plataforma class Usuarie < ApplicationRecord devise :invitable, :database_authenticatable, :recoverable, :rememberable, :validatable, :confirmable, :lockable, :registerable validates_uniqueness_of :email has_many :roles has_many :sites, through: :roles def rol_for_site(site) site.roles.merge(roles).first end end