Skip to content

Commit

Permalink
so that's why we need some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmartin committed Apr 8, 2012
1 parent dd4c818 commit d259e3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
2 changes: 1 addition & 1 deletion kontoapi-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
8 changes: 4 additions & 4 deletions lib/kontoapi-rails/orm/active_record_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d259e3c

Please sign in to comment.