Results 1 to 3 of 3
Feb 2, 2006, 05:08 #1
- Join Date
- Jun 2005
- Eastbourne, UK
- 0 Post(s)
- 0 Thread(s)
Quick Q: How to add a blank category to Category.find_all?
The app I'm currently building is my first attempt at a full RoR website. I've got most of my multi-level category system working how I would like (acts_as_nested_set is great!) but there is one little thing I've got stuck on:
In my new category function I have the following code:
def new @category = Category.new @categories = Category.find_all end
How can I add a blank (or equivalient root-level) item to the beginning of @categories?
I know it's probably simple but I havn't seen any mention of this in tutorials or books so far so I'm sure others like me will find the answer useful.