I have been using  Squirrel (http://thoughtbot.com/projects/squirrel)
for performing rails searches. It really takes the thinking out of sql
conditions and makes it so much more like normal ruby syntax.

I have recently been using the acts_as_tree gem(http://github.com/
jcnetdev/acts_as_tree/tree/master) for a Group model that has
children, grandchildren etc. Squirrel works well for the children and
parent methods since these are normal associations but for methods
like "ancestors" and "all_children" which are recursive methods ,
squirrel won't work.

I don't fully understand how squirrel uses associations. Can you think
of a way that squirrel could be used in this kind of way

Group.find(:all) do
        ancestors.name.contains?("Department")
end


Many thanks

Anthony
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
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