用户修改资料保存报错

This commit is contained in:
sw 2015-05-08 16:32:55 +08:00
parent 6a31a99c93
commit f12a20f85e
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ class MyController < ApplicationController
if @user.save && @se.save
# 头像保存
FileUtils.mv diskfile1, diskfile, force: true
FileUtils.mv diskfile1, diskfile, force: true if File.exist? diskfile1
@user.pref.save
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
set_language_if_valid @user.language