3

I want to force a save of an object even when a validation fails. I tried doing this

te.save(:validate => false)

However, this did not seem to work. What is the right way to do this?

0

1 Answer 1

4

That's the way according to the source of save_with_validation.

Are you sure it's not saved? Maybe you have database constraints which keep you from saving your object.

Have you checked your logs looking for INSERTs or UPDATEs?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.