Nature, science, photography and other things that interest me.

Archive for October, 2007

Ruby On Rails acts_as_tree select menu

This time I would like to share a helper I wrote for rails. I was trying to write a form to add categories and I wanted to present a neatly formatted select box of existing categories to select as the parent category. It also needed infinite nested subcategories. I could not find a tutorial or example code anywhere for what I was trying to do. So I wrote this little snippet. (more…)