This project is archived and is in readonly mode.

#2164 ✓wontfix
nachocab (at gmail)

validate_uniqueness_of meaningless error

Reported by nachocab (at gmail) | March 7th, 2009 @ 05:56 PM | in 2.x

Added new error to warn against validating a non-existent column.

Currently doing this, raises this error:

Topic.validates_uniqueness_of(:item) #instead of:item_id Topic.create(:item =>

NoMethodError Message: <"undefined method text?' for nil:NilClass">

Comments and changes to this ticket

  • Pratik

    Pratik March 8th, 2009 @ 12:17 AM

    • Title changed from “[PATCH] validate_uniqueness_of meaningless error” to “validate_uniqueness_of meaningless error”
  • Pratik

    Pratik March 8th, 2009 @ 12:22 AM

    • Assigned user set to “Pratik”
    • State changed from “new” to “wontfix”
    • Patch shouldn't be changing things not related to the ticket.
    • I think it's best to leave out such error warnings. No other validations are doing it, so no point in making an exception for validate_uniqueness_of


  • nachocab (at gmail)

    nachocab (at gmail) March 8th, 2009 @ 09:04 PM

    Thank you Pratik, I understand that if you let inconsistent code creep in once, you're much more likely to do it again next time. Hope to code something better next time.



Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket