Sha256: 71a1192afd8500e38120811a80633103afdfae7c0ad05a2e3b0f7d5b81c2ce62
Contents?: true
Size: 291 Bytes
Versions: 4
Compression:
Stored size: 291 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
4 entries across 4 versions & 1 rubygems