mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Fix some CC issues
This commit is contained in:
parent
098d777162
commit
b5668ea494
1 changed files with 4 additions and 4 deletions
|
@ -6,15 +6,15 @@ class BankStatement < ApplicationRecord
|
|||
|
||||
validates :bank_code, :iban, presence: true
|
||||
|
||||
FULLY_BINDED = 'fully_binded'
|
||||
PARTIALLY_BINDED = 'partially_binded'
|
||||
NOT_BINDED = 'not_binded'
|
||||
FULLY_BINDED = 'fully_binded'.freeze
|
||||
PARTIALLY_BINDED = 'partially_binded'.freeze
|
||||
NOT_BINDED = 'not_binded'.freeze
|
||||
|
||||
# TODO: Cache this to database so it can be used for searching
|
||||
def status
|
||||
if bank_transactions.unbinded.count == bank_transactions.count
|
||||
NOT_BINDED
|
||||
elsif bank_transactions.unbinded.count == 0
|
||||
elsif bank_transactions.unbinded.count.zero?
|
||||
FULLY_BINDED
|
||||
else
|
||||
PARTIALLY_BINDED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue