Skip to content

Commit

Permalink
Added presence validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
leio10 committed Oct 9, 2017
1 parent 896c37a commit 29ee115
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
iban_bic (1.0.0)
iban_bic (1.0.1)
rails (~> 5.1)
regexp-examples (~> 1.3)

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ $ bundle exec rails generate iban_bic:install --with-static-data

## Changelog

#### 1.0.1

* Added presence validations in BIC model

#### 1.0.0

* Added IBAN fixing and random IBAN generator.
Expand Down
2 changes: 2 additions & 0 deletions lib/iban_bic/models/bic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
class Bic < ActiveRecord::Base
self.table_name = IbanBic.configuration.bics_table_name

validates :country, :bank_code, :bic, presence: true

after_commit do
IbanBic.clear_cache
end
Expand Down
2 changes: 1 addition & 1 deletion lib/iban_bic/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module IbanBic
VERSION = "1.0.0"
VERSION = "1.0.1"
end

0 comments on commit 29ee115

Please sign in to comment.