Agile Web Development

Build it. Launch it. Love it.

acts_as_ordered_tree

Vitals

Home http://ordered-tree.rubyforge.org/
Repository svn://rubyforge.org/var/svn/ordered-tree/acts_as_ordered_tree
License Rails' (MIT)
Tags Tag_red acts_as_tree nested sortable tree
Rating (17 votes)
Owner Brian D. Burns
Created 18 February 2007

Comments

  • Tom
    1 June 2007

    Why not just use acts_as_tree and acts_as_list together?

  • Avatar
    6 June 2007

    I tried that (acts_as_tree and acts_as_list) in combination. You'll get problems when you start using :scope and friends, this one is way better - and more efficient, easier to use and so on. Recommended.

  • Avatar
    Danny
    26 June 2008

    I'm getting an error: undefined method `first?' for #<Page:0x23aa514>

    In controller: # PUT /pages/1;higher def higher

    page = Page.find(params[:id])
    unless page.nil?
        if page.first?
            page.move_to_bottom
        else
            page.move_higher
        end
    end
    redirect_to pages_url
    

    end

    In model: class Page < ActiveRecord::Base acts_as_ordered_tree :foreign_key => :parent_id,

                       :order       =&gt; :position
    

    end

    I'm sure I'm making a newbie mistake. Thanks for your help.

Add a comment