Fix numericality validation to use correct integer only constraint
Fixes #2355
This commit is contained in:
parent
de973d08ca
commit
135ec35a91
12 changed files with 38 additions and 38 deletions
|
@ -37,11 +37,11 @@ class Relation < ActiveRecord::Base
|
|||
has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation
|
||||
|
||||
validates :id, :uniqueness => true, :presence => { :on => :update },
|
||||
:numericality => { :on => :update, :integer_only => true }
|
||||
:numericality => { :on => :update, :only_integer => true }
|
||||
validates :version, :presence => true,
|
||||
:numericality => { :integer_only => true }
|
||||
:numericality => { :only_integer => true }
|
||||
validates :changeset_id, :presence => true,
|
||||
:numericality => { :integer_only => true }
|
||||
:numericality => { :only_integer => true }
|
||||
validates :timestamp, :presence => true
|
||||
validates :changeset, :associated => true
|
||||
validates :visible, :inclusion => [true, false]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue