Class: Workarea::Tax::Rate
- Inherits:
-
Object
- Object
- Workarea::Tax::Rate
- Includes:
- ApplicationDocument
- Defined in:
- app/models/workarea/tax/rate.rb
Instance Method Summary collapse
Methods included from ApplicationDocument
Methods included from Sidekiq::Callbacks
assert_valid_config!, async, disable, enable, inline, #run_callbacks
Instance Method Details
#valid? ⇒ Boolean
21 22 23 24 25 26 27 |
# File 'app/models/workarea/tax/rate.rb', line 21 def valid?(*) super.tap do self.region = nil if region.blank? self.postal_code = nil if postal_code.blank? self.percentage ||= 0 end end |