aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-01-09 22:30:21 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-01-09 22:30:21 +0100
commit224eddfc0eeff6555ae88691306e61c7a9e8b758 (patch)
treeddd93f8de3d51333bd0ab18fb2f7181368c5500e /activerecord/test/models
parent9d681fc74c6251d5f2b93fa9576c9b2113116680 (diff)
parent21c0a1f3016b1de81f455f2a242803db91f96f17 (diff)
downloadrails-224eddfc0eeff6555ae88691306e61c7a9e8b758.tar.gz
rails-224eddfc0eeff6555ae88691306e61c7a9e8b758.tar.bz2
rails-224eddfc0eeff6555ae88691306e61c7a9e8b758.zip
Merge pull request #20835 from glittershark/if-and-unless-in-secure-token
Support :if and :unless in has_secure_token
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/user.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/models/user.rb b/activerecord/test/models/user.rb
index f5dc93e994..a40385e047 100644
--- a/activerecord/test/models/user.rb
+++ b/activerecord/test/models/user.rb
@@ -1,6 +1,9 @@
class User < ActiveRecord::Base
has_secure_token
has_secure_token :auth_token
+ has_secure_token :conditional_token, if: :token_condition
+
+ attr_accessor :token_condition
end
class UserWithNotification < User