mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
feat(entries): Add amount validation and robustify monetizable concern (#1680)
* feat(entries): Add amount validation and robustify monetizable concern * fix(valuations): localize blank amount errors --------- Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: SureBot <sure-bot@we-promise.com>
This commit is contained in:
@@ -7,7 +7,7 @@ module Monetizable
|
||||
define_method("#{field}_money") do |**args|
|
||||
value = self.send(field, **args)
|
||||
|
||||
return nil if value.nil? || monetizable_currency.nil?
|
||||
return nil if value.blank? || monetizable_currency.nil?
|
||||
|
||||
Money.new(value, monetizable_currency)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user