SUZUKI Miho
null+****@clear*****
Thu Sep 13 18:08:43 JST 2012
SUZUKI Miho 2012-09-13 18:08:43 +0900 (Thu, 13 Sep 2012) New Revision: e123f8fb0bad921f51c6d93a3c95f3ceb6f1e252 https://github.com/logaling/logaling-server/commit/e123f8fb0bad921f51c6d93a3c95f3ceb6f1e252 Merged c5d082c: Merge pull request #13 from logaling/enable-creating-user-glossary Log: Add validation Modified files: app/models/user_glossary.rb Modified: app/models/user_glossary.rb (+1 -1) =================================================================== --- app/models/user_glossary.rb 2012-09-11 16:47:44 +0900 (4ee3f95) +++ app/models/user_glossary.rb 2012-09-13 18:08:43 +0900 (534049a) @@ -4,7 +4,7 @@ class UserGlossary < ActiveRecord::Base belongs_to :user validates_presence_of :name, :source_language, :target_language - #TODO: validation + validates_uniqueness_of :name, scope: [:user_id, :source_language, :target_language] after_create :create_personal_project! -------------- next part -------------- An HTML attachment was scrubbed... 下載