mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
Merge branch 'develop' into standalone_develop
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
class Issues::CreateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :subject
|
||||
attr_accessor :subject, :description
|
||||
|
||||
validates :subject, presence: { message: "不能为空" }
|
||||
|
||||
validates :subject, length: { maximum: 200, too_long: "不能超过200个字符" }
|
||||
|
||||
|
||||
validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
end
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
class Issues::UpdateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :subject
|
||||
attr_accessor :subject, :description
|
||||
|
||||
validates :subject, presence: { message: "不能为空" }
|
||||
|
||||
validates :subject, length: { maximum: 200, too_long: "不能超过200个字符" }
|
||||
|
||||
validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
|
||||
end
|
||||
7
app/forms/journals/create_form.rb
Normal file
7
app/forms/journals/create_form.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Journals::CreateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :notes
|
||||
|
||||
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
end
|
||||
8
app/forms/journals/update_form.rb
Normal file
8
app/forms/journals/update_form.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Journals::UpdateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :notes
|
||||
|
||||
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user