Can't tell what the problem is from the information given. include?
can be used in this fashion, so the problem is due to something else.
Do something like this in script/console and show us the output:
@original_article = Article.find(123)
@original_article.links
@article = Article.find(456)
@original_article.include? @article
Use appropriate id numbers. That way we can see what's going on.
can you go to script/console and try this
@original_article = Article.find(59)
@original_article.link_ids
@article = Article.find(125)
@original_article.link_ids.include?(@article.id)
I'm stumped. I tried this on one of my own HABTM associations and
include? was working fine when comparing objects (not just ids).
For kicks what does this show:
@original_article.links.first == @article
In my testing, this returns true.