user.rb 374 B

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