projects
/
rails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump js-cookie from 3.0.0 to 3.0.1
[rails.git]
/
app
/
models
/
redaction.rb
diff --git
a/app/models/redaction.rb
b/app/models/redaction.rb
index b835864db074b40e7c27cfd8521e0689b96aa979..f4eedde0a2daddb172843d910507494261c1b4ae 100644
(file)
--- a/
app/models/redaction.rb
+++ b/
app/models/redaction.rb
@@
-7,7
+7,7
@@
# description :text
# created_at :datetime
# updated_at :datetime
# description :text
# created_at :datetime
# updated_at :datetime
-# user_id :
integer
not null
+# user_id :
bigint(8)
not null
# description_format :enum default("markdown"), not null
#
# Foreign Keys
# description_format :enum default("markdown"), not null
#
# Foreign Keys
@@
-24,14
+24,15
@@
# record's title and description fields, which can be
# displayed linked from the redacted records.
#
# record's title and description fields, which can be
# displayed linked from the redacted records.
#
-class Redaction < A
ctiveRecord::Base
+class Redaction < A
pplicationRecord
belongs_to :user
has_many :old_nodes
has_many :old_ways
has_many :old_relations
belongs_to :user
has_many :old_nodes
has_many :old_ways
has_many :old_relations
- validates :description, :presence => true
+ validates :title, :presence => true, :characters => true
+ validates :description, :presence => true, :characters => true
validates :description_format, :inclusion => { :in => %w[text html markdown] }
# this method overrides the AR default to provide the rich
validates :description_format, :inclusion => { :in => %w[text html markdown] }
# this method overrides the AR default to provide the rich