Flowdock
method

validate_on_create

Importance_0
v1.1.1 - Show latest stable - 0 notes - Class: Person
validate_on_create() protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/examples/validation.rb, line 46
    def validate_on_create
      if attribute_present?("name") && Person.name_exists?(name)
          errors.add("name", "is already taken by another person")
      end
    end
Register or log in to add new notes.