aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
diff options
context:
space:
mode:
authorRobby Grossman <robby@freerobby.com>2012-07-31 16:16:21 -0400
committerRobby Grossman <robby@freerobby.com>2012-07-31 16:16:21 -0400
commitad7f9cdf008e1261fdcdc8e8152462f69b48c20d (patch)
treedbc0121154f4735273a432d624a9412988961915 /activemodel/test/models
parentc10202208982bfa02ffd16d1614992228391d781 (diff)
downloadrails-ad7f9cdf008e1261fdcdc8e8152462f69b48c20d.tar.gz
rails-ad7f9cdf008e1261fdcdc8e8152462f69b48c20d.tar.bz2
rails-ad7f9cdf008e1261fdcdc8e8152462f69b48c20d.zip
has_secure_password should not raise a 'digest missing' error if the calling class has specified for validations to be skipped.
Diffstat (limited to 'activemodel/test/models')
-rw-r--r--activemodel/test/models/oauthed_user.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activemodel/test/models/oauthed_user.rb b/activemodel/test/models/oauthed_user.rb
new file mode 100644
index 0000000000..9750bc19d4
--- /dev/null
+++ b/activemodel/test/models/oauthed_user.rb
@@ -0,0 +1,11 @@
+class OauthedUser
+ extend ActiveModel::Callbacks
+ include ActiveModel::Validations
+ include ActiveModel::SecurePassword
+
+ define_model_callbacks :create
+
+ has_secure_password(validations: false)
+
+ attr_accessor :password_digest, :password_salt
+end