Dmitry V. Sabanin wrote:

> I want to follow KISS for now, so `folders` table is like:
>   + id
>   + parent_id
>   + name
>   + description
>   However,  I fear that there's no way to do 'has_many :folders' inside Folder 
> model, because it's not in AR's design(probably there'll be "name-guessing" 
> issues or someth like that). Any ideas are very, very appreciated!

This is no problem with ActiveRecord:

belongs_to :parent, :class_name => 'Folder', :foreign_key => 'folder_id'
has_many :children, :class_name => 'Folder', :foreign_key => 'folder_id'

-- 
http://www.mikrocontroller.net - Das Mikrocontroller-Forum