Sha256: 74de0611860a00434debbc3dedf8e61e2757bc80dbcac06d5a28d8650c44b13a
Contents?: true
Size: 840 Bytes
Versions: 1
Compression:
Stored size: 840 Bytes
Contents
# frozen_string_literal: true class Month include EnumField::DefineEnum attr_reader :code def initialize(code) @code = code.to_sym end def title I18n.t(@code, scope: [:month_title]) end define_enum do |builder| builder.member :january, object: new(:january) builder.member :february, object: new(:february) builder.member :march, object: new(:march) builder.member :april, object: new(:april) builder.member :may, object: new(:may) builder.member :june, object: new(:june) builder.member :july, object: new(:july) builder.member :august, object: new(:august) builder.member :september, object: new(:september) builder.member :october, object: new(:october) builder.member :november, object: new(:november) builder.member :december, object: new(:december) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
translation_cms-0.1.5 | app/models/defaults/month.rb |