mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +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
|
validates :bank_code, :iban, presence: true
|
||||||
|
|
||||||
FULLY_BINDED = 'fully_binded'
|
FULLY_BINDED = 'fully_binded'.freeze
|
||||||
PARTIALLY_BINDED = 'partially_binded'
|
PARTIALLY_BINDED = 'partially_binded'.freeze
|
||||||
NOT_BINDED = 'not_binded'
|
NOT_BINDED = 'not_binded'.freeze
|
||||||
|
|
||||||
# TODO: Cache this to database so it can be used for searching
|
# TODO: Cache this to database so it can be used for searching
|
||||||
def status
|
def status
|
||||||
if bank_transactions.unbinded.count == bank_transactions.count
|
if bank_transactions.unbinded.count == bank_transactions.count
|
||||||
NOT_BINDED
|
NOT_BINDED
|
||||||
elsif bank_transactions.unbinded.count == 0
|
elsif bank_transactions.unbinded.count.zero?
|
||||||
FULLY_BINDED
|
FULLY_BINDED
|
||||||
else
|
else
|
||||||
PARTIALLY_BINDED
|
PARTIALLY_BINDED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue