[logaling-commit] logaling/logaling-server [enable-copy-user-glossary] Add validation for user_id

Zurück zum Archiv-Index

SHIMADA Koji null+****@clear*****
Fri Sep 28 16:36:08 JST 2012


SHIMADA Koji	2012-09-28 16:36:08 +0900 (Fri, 28 Sep 2012)

  New Revision: d1c05fe21503e972754348a4de0ec913675c3258
  https://github.com/logaling/logaling-server/commit/d1c05fe21503e972754348a4de0ec913675c3258

  Log:
    Add validation for user_id

  Modified files:
    app/models/user_glossary.rb

  Modified: app/models/user_glossary.rb (+1 -1)
===================================================================
--- app/models/user_glossary.rb    2012-09-28 16:35:27 +0900 (20026b7)
+++ app/models/user_glossary.rb    2012-09-28 16:36:08 +0900 (0668308)
@@ -15,7 +15,7 @@ class UserGlossary < ActiveRecord::Base
 
   belongs_to :user
 
-  validates_presence_of :name, :source_language, :target_language
+  validates_presence_of :name, :source_language, :target_language, :user_id
   validates_uniqueness_of :name, scope: [:user_id, :source_language, :target_language]
   validate :original_user_glossary_id_must_exist,
     if: "original_user_glossary_id.present?",
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Zurück zum Archiv-Index