Skip to content
Browse files

fix for .invalid? and init.rb to run as plugin

  • Loading branch information...
1 parent cf0a589 commit 8a84b7d890787e6396a6e6d33e40731363c2299b @ssoroka committed Mar 31, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 init.rb
  2. +1 −1 lib/errors.rb
View
1 init.rb
@@ -0,0 +1 @@
+require File.join(File.dirname(__FILE__),'lib','validatable')
View
2 lib/errors.rb
@@ -16,7 +16,7 @@ class Errors
# company.errors.invalid?(:name) # => true
# company.errors.invalid?(:address) # => false
def invalid?(attribute)
- !@errors[attribute.to_s].nil?
+ !@errors[attribute.to_sym].nil?
end
# call-seq: on(attribute)

0 comments on commit 8a84b7d

Please sign in to comment.
Something went wrong with that request. Please try again.