From fa517705e9cb151c9d32ec03ea43cfcdaa72ecb2 Mon Sep 17 00:00:00 2001 From: Jan Schwenzien Date: Fri, 3 Aug 2012 10:46:03 +0200 Subject: [PATCH] hotfix --- VERSION | 2 +- kontoapi-rails.gemspec | 2 +- lib/kontoapi-rails/validators/bank_account_validator.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 373f8c6..72f9fa8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.3 \ No newline at end of file +0.2.4 \ No newline at end of file diff --git a/kontoapi-rails.gemspec b/kontoapi-rails.gemspec index b70bbb1..b92ecde 100644 --- a/kontoapi-rails.gemspec +++ b/kontoapi-rails.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = "kontoapi-rails" - s.version = "0.2.3" + s.version = "0.2.4" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Jan Schwenzien"] diff --git a/lib/kontoapi-rails/validators/bank_account_validator.rb b/lib/kontoapi-rails/validators/bank_account_validator.rb index b70b7fc..0b7ee06 100644 --- a/lib/kontoapi-rails/validators/bank_account_validator.rb +++ b/lib/kontoapi-rails/validators/bank_account_validator.rb @@ -6,7 +6,7 @@ class BankAccountValidator < ActiveModel::Validator def validate(record) account_number = record.send(:"#{options[:account_number_field]}") bank_code = record.send(:"#{options[:bank_code_field]}") - return true unless send(:"#{options[:account_number_field]}_changed?") || send(:"#{options[:bank_code_field]}_changed?") + return true unless record.send(:"#{options[:account_number_field]}_changed?") || record.send(:"#{options[:bank_code_field]}_changed?") return true if options[:allow_nil] && (account_number.nil? || bank_code.nil?) record.errors.add(:"#{options[:account_number_field]}", :invalid) unless KontoAPI::valid?( :ktn => account_number, :blz => bank_code ) rescue Timeout::Error => ex