lib/ecrire/app/models/title.rb in ecrire-0.29.0 vs lib/ecrire/app/models/title.rb in ecrire-0.30.0
- old
+ new
@@ -7,14 +7,14 @@
end
def validate_length!(record)
if record.name.blank?
msg = "Your title can't be blank."
- record.errors['name'] << msg
+ record.errors['base'] << msg
record.post.errors['title'] << msg
elsif record.name.length < 1
msg = "Your title needs to be at least 1 character long."
- record.errors['name'] << msg
+ record.errors['base'] << msg
record.post.errors['title'] << msg
end
end
def validate_uniqueness!(record)