0

I have a model that has several properties. I want to validate that at least one of those properties is set. I saw the post here, but the errors.add_to_base is now deprecated in Rails 3 and was wondering what the new solution might be.

Community
  • 1
  • 1
codecraig
  • 3,118
  • 9
  • 48
  • 62

1 Answers1

3

It's now simply

errors.add(:base, "message")
Marcel Jackwerth
  • 53,948
  • 9
  • 74
  • 88