Flowdock
method

invalid?

Importance_1
v2.0.0 - Show latest stable - 0 notes - Class: ActiveResource::Errors
invalid?(attribute) public

Returns true if the specified attribute has errors associated with it.

Examples

  my_resource = Disk.find(1)
  my_resource.errors.add('location', 'must be Main') unless my_resource.location == 'Main'
  my_resource.errors.on('location')
  # => 'must be Main!'

  my_resource.errors.invalid?('location')
  # => true
  my_resource.errors.invalid?('name')
  # => false
Show source
Register or log in to add new notes.