mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
fixed codeclimate error
This commit is contained in:
parent
ce218c34b9
commit
a6b37ff5ac
1 changed files with 7 additions and 5 deletions
|
@ -21,12 +21,14 @@ module Actions
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_new_balance
|
def validate_new_balance
|
||||||
@error = true and return if @new_balance.blank?
|
if @new_balance.blank?
|
||||||
|
|
||||||
begin
|
|
||||||
!Float(@new_balance).nil?
|
|
||||||
rescue StandardError
|
|
||||||
@error = true
|
@error = true
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
!Float(@new_balance).nil?
|
||||||
|
rescue StandardError
|
||||||
|
@error = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue