Skip to content

Instantly share code, notes, and snippets.

@bfolkens
Created December 8, 2009 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfolkens/251423 to your computer and use it in GitHub Desktop.
Save bfolkens/251423 to your computer and use it in GitHub Desktop.
diff --git a/lib/authlogic_oauth/acts_as_authentic.rb b/lib/authlogic_oauth/acts_as_authentic.rb
index ddc313c..a929aee 100644
--- a/lib/authlogic_oauth/acts_as_authentic.rb
+++ b/lib/authlogic_oauth/acts_as_authentic.rb
@@ -45,11 +45,11 @@ module AuthlogicOauth
validates_uniqueness_of klass.oauth_token_field, :scope => validations_scope, :if => :using_oauth?
validates_presence_of klass.oauth_secret_field, :scope => validations_scope, :if => :using_oauth?
- validates_length_of_password_field_options validates_length_of_password_field_options.merge(:if => :validate_password_with_oauth?)
- validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.merge(:if => :validate_password_with_oauth?)
- validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.merge(:if => :validate_password_with_oauth?)
- validates_length_of_login_field_options validates_length_of_login_field_options.merge(:if => :validate_password_with_oauth?)
- validates_format_of_login_field_options validates_format_of_login_field_options.merge(:if => :validate_password_with_oauth?)
+ validates_length_of_password_field_options validates_length_of_password_field_options.reverse_merge(:if => :validate_password_with_oauth?)
+ validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.reverse_merge(:if => :validate_password_with_oauth?)
+ validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.reverse_merge(:if => :validate_password_with_oauth?)
+ validates_length_of_login_field_options validates_length_of_login_field_options.reverse_merge(:if => :validate_password_with_oauth?)
+ validates_format_of_login_field_options validates_format_of_login_field_options.reverse_merge(:if => :validate_password_with_oauth?)
end
# email needs to be optional for oauth
@@ -131,4 +131,4 @@ module AuthlogicOauth
end
end
-end
\ No newline at end of file
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment