Hi Phoenix Rising,

Thanks for looking at my issue. I have UTF encoding for my databases and 
also
for the rails app.

My hunch is that it got to do something with category table having 
parent_id for acts_as_tree plugin requirement. Every time, I add a 
children of root category
the root category gets added itself. It then repeats. This is surprising 
and I have never experienced like this before.

As a temp work around I have added
has_many :products, :through => :categorizations, :uniq => true
but it won't solve the problem root category getting inserted themselves 
but should avoid multiple insertions. Note category 45 was assigned but 
after some time parents adds itself repeatedly.

Here is sample of insertion
#<Category id: 45, parent_id: 12, name: "Books", description: "", 
created_at: "2011-02-21 08:08:17", updated_at: "2011-02-21 08:08:17", 
permalink: "books">, #<Category id: 12, parent_id: 11, name: "Kids", 
description: "", created_at: "2010-09-16 23:28:06", updated_at: 
"2011-01-05 11:17:10", permalink: "kids">, #<Category id: 12, parent_id: 
11, name: "Kids", description: "", created_at: "2010-09-16 23:28:06", 
updated_at: "2011-01-05 11:17:10", permalink: "kids">, #<Category id: 
12, parent_id: 11, name: "Kids", description: "", created_at: 
"2010-09-16 23:28:06", updated_at: "2011-01-05 11:17:10", permalink: 
"kids">, #<Category id: 12, parent_id: 11, name: "Kids", description: ""

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to