Sha256: 8f96a5f4ba3ddde5043fd5899cb454ad9fcda905d829a5ea764cd07fdfc60a47
Contents?: true
Size: 286 Bytes
Versions: 10
Compression:
Stored size: 286 Bytes
Contents
module Agilibox::DefaultValuesConcern extend ActiveSupport::Concern def assign_default_values; end def assign_default(attribute, value) self.send("#{attribute}=", value) if self.send(attribute).nil? end included do after_initialize :assign_default_values end end
Version data entries
10 entries across 10 versions & 1 rubygems