diff --git a/VERSION b/VERSION index 341cf11..7dff5b8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 \ No newline at end of file +0.2.1 \ No newline at end of file diff --git a/kontoapi-rails.gemspec b/kontoapi-rails.gemspec index cd5e10b..dff8187 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.0" + s.version = "0.2.1" 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/orm/active_record_extension.rb b/lib/kontoapi-rails/orm/active_record_extension.rb index d9c10ce..1a343a1 100644 --- a/lib/kontoapi-rails/orm/active_record_extension.rb +++ b/lib/kontoapi-rails/orm/active_record_extension.rb @@ -50,11 +50,11 @@ def validates_iban(field, options={}) value = send(field) return true if options[:allow_nil] && value.nil? begin - record.errors.add(field, :invalid) unless KontoAPI::valid?( :iban => value ) + errors.add(field, :invalid) unless KontoAPI::valid?( :iban => value ) rescue Timeout::Error => ex case options[:on_timeout] when :fail - record.errors.add(field, :timeout) + errors.add(field, :timeout) when :ignore # nop end @@ -70,11 +70,11 @@ def validates_bic(field, options={}) value = send(field) return true if options[:allow_nil] && value.nil? begin - record.errors.add(field, :invalid) unless KontoAPI::valid?( :bic => send(field) ) + errors.add(field, :invalid) unless KontoAPI::valid?( :bic => send(field) ) rescue Timeout::Error => ex case options[:on_timeout] when :fail - record.errors.add(field, :timeout) + errors.add(field, :timeout) when :ignore # nop end