#652 ✓invalid
Kieran P

client_id :required != validates_presence_of :client_id

Reported by Kieran P | March 2nd, 2010 @ 02:21 AM

I have a Contact and ContactDetail model. contact has many contact details. contact detail belongs to a client

fields do
  client_id :integer, :required
end

When you make the contact details accessible when making a contact, and you add one, it fails, with client cannot be blank.

When I switch to:

fields do
  client_id :integer
end
validates_presence_of :client

Then it works as it should, seeing that the records being created are part of a parent record.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages