Closed evanthegrayt closed 3 years ago
This is wrong. Shouldn't yield config, but entry.
def self.create entry = new( Date.today, config.current, config.previous, config.impediments, config.notes ) yield config if block_given? entry end
Should be
def self.create new( Date.today, config.current, config.previous, config.impediments, config.notes ).tap { |config| yield config if block_given? } end
This is wrong. Shouldn't yield config, but entry.
Should be