user.rb 459 B

1234567891011121314
  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. has_many :work_experiences
  8. def i18n_tagline
  9. return Text.where(user_id: self.id, language: I18n.locale, key: self.tagline)[0].text
  10. end
  11. def i18n_bio
  12. return Text.where(user_id: self.id, language: I18n.locale, key: self.bio)[0].text
  13. end
  14. end