I have:

#####

In the Projects model...

   acts_as_tree :order => "name"

###

In the Projects/show view...

<%= link_to 'Create Subproject', new_project_path, { :parent =>
@project.id } %>

###

In the Projects controller...
  def new
    @project = Project.new
    @project.parent_id = :parent
      respond_to do |format|
    format.html
    end
  end

###

Yet in script/console, I can see each new project has a parent_id of
nil. How do I pass the value of :parent to a new project when I'm
creating it as a subproject?


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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