Permalink
Browse files

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

Signed-off-by: Jeremy Burks <jrun@runnerdb.com>
  • Loading branch information...
1 parent c2e90f7 commit ba07059b1b26160a62f1d4a8723c3e40f67f38ae @ssoroka ssoroka committed with Jeremy Burks Apr 1, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 init.rb
  2. +1 −1 lib/errors.rb
View
@@ -0,0 +1 @@
+require File.join(File.dirname(__FILE__),'lib','validatable')
View
@@ -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 ba07059

Please sign in to comment.