File: user.rb

package info (click to toggle)
ruby-bootstrap-form 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 848 kB
  • sloc: ruby: 1,482; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
class User < ApplicationRecord
  serialize :preferences

  validates :email, presence: true, length: { minimum: 5 }
  validates :terms, acceptance: { accept: true }

  has_one :address
  accepts_nested_attributes_for :address

  has_rich_text(:life_story) if Rails::VERSION::STRING > "6"
end