Short answer: if your validation line says this ...
... then change it to reference column name instead of association name like this ...
... and you're all set! Have a good day.
For an explanation of why this happens, read these steps I used to re-create ("..." denotes output I didn't paste in here):
I threw a debugger call into active_record's uniqueness.rb file:
and dove back into the console
now line 57 is making sense
back to tagging.rb:
... and it works!
Thursday, August 11, 2011
about this blog:
I am a self-taught Ruby on Rails programmer, so I depend on the community-of-strangers that is the Internet for so many little bits of information. This blog is here for one purpose: to save you five minutes at a time by giving you a solution or answering a question that took me more than five minutes to figure out.
The format is intended to be incredibly simple:
Given a certain context A
When I run into problem B
Then I get past it by doing C
The name? That refers to the ten postulates that form the foundation of Euclid's geometry. Basically I just like the sound of the name.
My other websites: