Hi, I confirm that it doesn't work in pre26 either.
I'll try your patch when I have time. Thanks for the tips, Arnaud. 2011/1/8 Matthias Wächter <[email protected]> > Hi! > > I just started using hobo and find that acts_as_list doesn’t work as > expected. > > Issue #1: It doesn’t work with the current acts_as_list gem (0.1.2) at > all without patching the hobo sources – see attached patch. > > Next, I tried a 1-to-many relationship. The models and controllers are > straight-forward as in the acts_as_list example, just added the children > declaration to the TodoList model and the auto_actions_for to the > TodoItem controller. > > > class TodoItem < ActiveRecord::Base > > > > hobo_model # Don't put anything above this > > > > fields do > > name :string > > timestamps > > end > > > > belongs_to :todo_list > > acts_as_list :scope => :todo_list > > > > # --- Permissions --- # > > […] > > end > > > class TodoList < ActiveRecord::Base > > > > hobo_model # Don't put anything above this > > > > fields do > > timestamps > > end > > > > has_many :todo_items, :order => 'position' > > children :todo_items > > > > # --- Permissions --- # > > […] > > end > > > class TodoItemsController < ApplicationController > > > > hobo_model_controller > > > > auto_actions :all > > > > auto_actions_for :todo_list, [:new, :create, :index] > > > > end > > Issue #3: As soon as a model acts as a list, I would expect it not to be > created/edited alone, without the parent element it cannot live with. I > would expect it to vanish from the top navigation bar for this reason. > That’s just a thought, though. > > Issue #4: When editing the list item, it should not be possible to edit > or view its list position as it breaks the acts_as_list property. > > Issue #5: It would be great if one can specify auto_actions_for …, > [:destroy] for such a list item to be directly deleted. Has this ever > been considered? > > > > Issue #6: Next, I tried acts_as_list for many-to-many relations, and it > breaks completely. Has anyone ever looked at that scenario? > > – Matthias > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" 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/hobousers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
