I have a find query in a controller like this
def loadtags(product)
@tags =
Tagging.find_all_by_taggable_type_and_taggable_id(0,product.id)
puts product.id
puts @tags.collect{|x| x.id}
@tags.collect!{|x| x.id}.collect!{|x| Tag.find(x)}
puts @tags.collect{|x| x.name}
puts ‘----------------------------’
@tags
end
and I test with the same parameters in irb
but get different search results.
The one in controller returns some taggings I already deleted in the
database while it returns the right data while in irb.
I thought there may be some caching undergoing.
So I restarted the app.
But the situation remains.
Any one can solve the mystery here?
Many thanks,