use method in validates statement
This commit is contained in:
parent
328da189d2
commit
7a72c75a9c
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ class Project < ActiveRecord::Base
|
||||||
validates :namespace, presence: true
|
validates :namespace, presence: true
|
||||||
validates_uniqueness_of :name, scope: :namespace_id
|
validates_uniqueness_of :name, scope: :namespace_id
|
||||||
validates_uniqueness_of :path, scope: :namespace_id
|
validates_uniqueness_of :path, scope: :namespace_id
|
||||||
validates :import_url, addressable_url: true, if: "import_url.present?"
|
validates :import_url, addressable_url: true, if: :external_import?
|
||||||
validates :star_count, numericality: { greater_than_or_equal_to: 0 }
|
validates :star_count, numericality: { greater_than_or_equal_to: 0 }
|
||||||
validate :check_limit, on: :create
|
validate :check_limit, on: :create
|
||||||
validate :avatar_type,
|
validate :avatar_type,
|
||||||
|
|
Loading…
Reference in a new issue