user.rb 428 B

12345678910111213
  1. class User < ApplicationRecord
  2. has_many :mail_adresses
  3. has_many :resumes
  4. has_many_attached :picture
  5. has_and_belongs_to_many :technologies
  6. has_many :user_social_links
  7. def i18n_tagline
  8. return Text.where(user_id: self.id, language: I18n.locale, key: self.tagline)[0].text
  9. end
  10. def i18n_bio
  11. return Text.where(user_id: self.id, language: I18n.locale, key: self.bio)[0].text
  12. end
  13. end