Sha256: 115ba5142dce1b20476e4d3a74914f222164dd431d7ebcd98418f32f9e1623a7
Contents?: true
Size: 612 Bytes
Versions: 19
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true module Tramway::SportSchool class Trainer < ::Tramway::Core::ApplicationRecord enumerize :degree, in: %i[master_of_sport candidate_master_of_sports] mount_uploader :photo, PhotoUploader state_machine :view_state, initial: :published do state :published state :hidden event :publish do transition hidden: :published end event :hide do transition published: :hidden end end scope :published, -> { active.where view_state: :published } scope :hidden, -> { active.where view_state: :hidden } end end
Version data entries
19 entries across 19 versions & 1 rubygems