浏览代码

employ mobile 2

abiao 2 年之前
父节点
当前提交
b8bc5154ba
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/models/employ.rb

+ 3 - 3
app/models/employ.rb

@@ -9,10 +9,10 @@ class Employ < ActiveRecord::Base
         wu = WxUser.where("user_id = ?", usr.id).first
         if !wu.blank?
             self.wx_user_id = wu.id
-        else
-          self.errors.add(:mobile,"该手机号尚未绑定微信账号,请员工预先绑定小程序!")
         end
-      end
+    else
+      self.errors.add(:mobile,"该手机号尚未绑定微信账号,请员工预先绑定小程序!")
+    end
   end
   rails_admin do
     navigation_label '食堂管理'