Sha256: d785447cf7d46bd587f16302801782cceebde62b7a1ade617dbbaec0f2533c20
Contents?: true
Size: 290 Bytes
Versions: 15
Compression:
Stored size: 290 Bytes
Contents
module BMC::DefaultValuesConcern extend ActiveSupport::Concern def assign_default_values end def assign_default(attribute, value) send("#{attribute}=", value) if send(attribute).nil? end included do after_initialize :assign_default_values, if: :new_record? end end
Version data entries
15 entries across 15 versions & 1 rubygems