validates_presence_of is deprecated
This commit is contained in:
parent
1232354817
commit
fe1227221e
@ -42,7 +42,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
|
||||
scope :visible, lambda {|*args| where(DmsfFile.visible_condition(args.shift || User.current, *args)).readonly(false)}
|
||||
|
||||
validates_presence_of :name
|
||||
validates :name, :presence => true
|
||||
validates_format_of :name, :with => DmsfFolder.invalid_characters,
|
||||
:message => l(:error_contains_invalid_character)
|
||||
|
||||
|
||||
@ -48,9 +48,8 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
"INNER JOIN #{Project.table_name} ON #{DmsfFile.table_name}.project_id = #{Project.table_name}.id",
|
||||
:conditions => ["#{DmsfFile.table_name}.deleted = :false", {:false => false}]
|
||||
}
|
||||
|
||||
validates_presence_of :title
|
||||
validates_presence_of :name
|
||||
|
||||
validates :title, :name, :presence => true
|
||||
validates_format_of :name, :with => DmsfFolder.invalid_characters,
|
||||
:message => l(:error_contains_invalid_character)
|
||||
|
||||
|
||||
@ -40,8 +40,8 @@ class DmsfFolder < ActiveRecord::Base
|
||||
scope :visible, lambda {|*args| {:conditions => "" }} #For future use, however best to be referenced now
|
||||
|
||||
acts_as_customizable
|
||||
|
||||
validates_presence_of :title
|
||||
|
||||
validate :title, :presence => true
|
||||
validates_uniqueness_of :title, :scope => [:dmsf_folder_id, :project_id]
|
||||
|
||||
validates_format_of :title, :with => @@invalid_characters,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user