Sha256: 701f9373384255d4346f1b26aac5104986a051a9623dcbd27c28efaf903619c9
Contents?: true
Size: 501 Bytes
Versions: 6
Compression:
Stored size: 501 Bytes
Contents
require_dependency "renalware" module Renalware module HD module HasSchedule extend ActiveSupport::Concern included do extend Enumerize enumerize :schedule, in: I18n.t(:schedule, scope: "enumerize.#{model_name.i18n_key}", cascade: true).keys validates :other_schedule, presence: true, if: :other_schedule_required? end private def other_schedule_required? schedule.try(:text) =~ /specify/ end end end end
Version data entries
6 entries across 6 versions & 1 rubygems