]> source.dussan.org Git - redmine.git/commitdiff
Add token value uniqueness validation (#3351).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 13 May 2009 16:55:15 +0000 (16:55 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 13 May 2009 16:55:15 +0000 (16:55 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2741 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/token.rb

index 54e251a40af78f9a6bcdd6a36f4907d16b72a293..a5199c770b75889f3fe9021eeb58c63b927a76ab 100644 (file)
@@ -17,6 +17,7 @@
 
 class Token < ActiveRecord::Base
   belongs_to :user
+  validates_uniqueness_of :value
   
   @@validity_time = 1.day