I have 2 models: topic model and post: class Topic < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base acts_as_tree :order=>"body" belongs_to :topic end and I have a view for creating new topic (and new post): <h1>Add a new Topic</h1> <% form_for :topic, @topic, :url => { :action => "create" } do |f| %> Title: <%= f.text_field :title %> <% fields_for :posts do |post| %> Body:<%= post.text_field :body %><br/> <% end %> <%= submit_tag ''Post Topic'', :class => "submit" %> <% end %> I get the undefined method ''act_as_tree'' error in the TopicsController: (in the create method) @post = Post.new(params[:post]) any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 24 Nov 2007, at 23:41, oren wrote:> > class Post < ActiveRecord::Base > acts_as_tree :order=>"body" > belongs_to :topic > end > > I get the undefined method ''act_as_tree'' error in theWhat version of rails are you running? In 2.0 acts_as_tree (along with a bunch of stuff) has been moved into separate plugins. Fred --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
edge.. I guess I need to google for this plug-in. thanks! On Nov 24, 4:04 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 24 Nov 2007, at 23:41, oren wrote: > > > > > class Post < ActiveRecord::Base > > acts_as_tree :order=>"body" > > belongs_to :topic > > end > > > I get the undefined method ''act_as_tree'' error in the > > What version of rails are you running? In 2.0 acts_as_tree (along with > a bunch of stuff) has been moved into separate plugins. > > Fred--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---