空数据库时创建项目报错问题,原redmine的项目按字母排序功能导致,现在项目没有按字母排序,故将之注释掉
This commit is contained in:
parent
ab052d645b
commit
6180943f72
|
@ -468,8 +468,8 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def new
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
end
|
||||
|
|
|
@ -123,7 +123,8 @@ class Project < ActiveRecord::Base
|
|||
# reserved words
|
||||
validates_exclusion_of :identifier, :in => %w( new )
|
||||
|
||||
after_save :update_position_under_parent, :if => Proc.new {|project| project.name_changed?}
|
||||
#此代码功能:为原redmine中项目的树形结构按名称首字母排序,本系统项目非树形结构,且项目排序方式无按首字母排序,另该代码执行会使空数据库时创建项目时出异常故注释掉
|
||||
#after_save :update_position_under_parent, :if => Proc.new {|project| project.name_changed?}
|
||||
after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}
|
||||
# 创建project之后默认创建一个board,之后的board去掉了board的概念
|
||||
after_create :create_board_sync
|
||||
|
|
16
db/schema.rb
16
db/schema.rb
|
@ -437,14 +437,14 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.string "web_title"
|
||||
t.string "title"
|
||||
t.text "description"
|
||||
t.string "page_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "page_type"
|
||||
t.integer "sort_type"
|
||||
t.integer "show_course", :default => 1
|
||||
t.integer "show_contest", :default => 1
|
||||
t.integer "image_width", :default => 107
|
||||
t.integer "image_height", :default => 63
|
||||
t.integer "show_course", :default => 1
|
||||
t.integer "show_contest", :default => 1
|
||||
end
|
||||
|
||||
create_table "forums", :force => true do |t|
|
||||
|
@ -976,11 +976,10 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.string "url"
|
||||
t.string "title"
|
||||
t.integer "share_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "project_id"
|
||||
t.integer "user_id"
|
||||
t.string "description"
|
||||
end
|
||||
|
||||
create_table "softapplications", :force => true do |t|
|
||||
|
@ -1086,8 +1085,8 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.integer "zip_code"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "technical_title"
|
||||
t.integer "identity"
|
||||
t.string "technical_title"
|
||||
t.string "student_id"
|
||||
t.string "teacher_realname"
|
||||
t.string "student_realname"
|
||||
|
@ -1145,6 +1144,9 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.integer "active"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "level"
|
||||
t.integer "file"
|
||||
t.integer "issue"
|
||||
end
|
||||
|
||||
create_table "user_statuses", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue