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,
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---