Sha256: 825852b579eba74f96a775e4ddefd9cce14a83e976e96bc5c1d302a07dcd0530
Contents?: true
Size: 436 Bytes
Versions: 23
Compression:
Stored size: 436 Bytes
Contents
event :set_autoname, :prepare_to_store, on: :create, when: :autoname? do self.name = autoname rule(:autoname) autoname_card = rule_card :autoname autoname_card.update_column :db_content, name autoname_card.expire pull_from_trash! Card.write_to_soft_cache self end def no_autoname? !autoname? end def autoname? name.blank? && (@autoname_rule.nil? ? (@autoname_rule = rule(:autoname).present?) : @autoname_rule) end
Version data entries
23 entries across 23 versions & 1 rubygems