From 9e5f7e6fc625f0678805968906242c8ddaba0ede Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 1 Aug 2014 14:36:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=B8=BB=E9=A1=B5=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E8=AF=BE=E7=A8=8B=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/softapplications_controller.rb | 4 ++-- app/models/softapplication.rb | 2 +- db/schema.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index f2b0a0c83..067465b40 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -156,8 +156,8 @@ class SoftapplicationsController < ApplicationController format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) } # format.json { render json: @softapplication, status: :created, location: @softapplication } else - format.js { render status: 406 } - format.html { render action: "new" } + #format.js { render status: 406 } + format.html { render action: "contests/show_attendingcontest" } # format.json { render json: @softapplication.errors, status: :unprocessable_entity } end end diff --git a/app/models/softapplication.rb b/app/models/softapplication.rb index a572a22ba..0234bc118 100644 --- a/app/models/softapplication.rb +++ b/app/models/softapplication.rb @@ -11,7 +11,7 @@ class Softapplication < ActiveRecord::Base belongs_to :project has_many :contests, :through => :contesting_softapplications - validates_length_of :name, :maximum => 125 + validates_length_of :name, :maximum => 25 validates_length_of :application_developers, :maximum => 125 validates_length_of :android_min_version_available, :maximum => 125 diff --git a/db/schema.rb b/db/schema.rb index 7643adb4b..9407794f4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140730024419) do +ActiveRecord::Schema.define(:version => 20140801034242) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false