The controller was generated with the hobo generator and does have auto_actions :all in it, and the alteration_assignment object has acts_as_list.
class AlterationAssignmentController < ApplicationController hobo_model_controller auto_actions :all end On Wednesday, December 12, 2012 3:31:48 PM UTC-6, Bryan Larsen wrote: > > Do you have auto_actions :all on your new controller? That should > add the reorder action if your model has the position_column method > defined (acts_as_list should do that). > > sortable-collection is really designed to be used outside of a form, > since it acts like an editor: aka changes take immediate effect rather > than waiting until a user hits "save". > > Bryan > > > On Wed, Dec 12, 2012 at 4:27 PM, Ryan <[email protected] <javascript:>> > wrote: > > > > On Wednesday, December 12, 2012 2:12:48 PM UTC-6, Bryan Larsen wrote: > >> > >> It seems to me that if you used <sortable-collection> on a set of > >> alteration_assignments rather than on a set of alterations, it should > >> work. Are you using Hobo 2.0 or 1.3? > >> > >> Bryan > >> > > > > It's Hobo 2.0. I tried replacing the destination edit form and adding > > <sortable-collection:alteration_assignments/>. From the cookbook entry > on > > sortable-collection it looked like the model being used needed a > controller, > > so I generated a controller for alteration_assignments. However the > > destination edit page kicks out and "undefined method > > `reorder_alteration_assignments_url' error. Maybe I am not using the > tag > > correctly, I didn't see any examples and am new to ruby/rails/hobo. > > > > I put this in application.dryml: > > > > <def tag="form" for="Destination"> > > <form merge param="default"> > > <error-messages param/> > > <field-list fields="name, alterations" param/> > > <sortable-collection:alteration_assignments param/> > > <div param="actions"> > > <submit label="#{ht 'destination.actions.save', > :default=>['Save']}" > > param/><or-cancel param="cancel"/> > > </div> > > </form> > > </def> > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Hobo Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/hobousers/-/ZLz-EuLiPjAJ. > > > > To post to this group, send email to [email protected]<javascript:>. > > > To unsubscribe from this group, send email to > > [email protected] <javascript:>. > > 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 view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/DFTeouzzYwUJ. 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.
