版本 输入名字不能为空

This commit is contained in:
lizanle 2015-04-17 14:21:18 +08:00
parent b6db00643e
commit 15e54dd765
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ class VersionsController < ApplicationController
end
else
respond_to do |format|
format.html { render :action => 'new' }
format.html { flash[:error] = @version.errors.full_messages.to_s
redirect_to settings_project_url(@project, :tab => 'versions') }
format.js { render :action => 'new' }
format.api { render_validation_errors(@version) }
end