Hi Kevin,

Do you mean something like:

class Activity < ActiveRecord::Base
   has_many :unit_activities, :order => :position
   has_many :units, :through => :unit_activities

....

class UnitActivity < ActiveRecord::Base
   belongs_to :activity
   belongs_to :unit
   acts_as_list :scope => :activity

...
class Unit < ActiveRecord::Base
   has_many :unit_activities
   has_many :activities, :through => :unit_activities

class ActivityHints < Hobo::ViewHints
  children :units

This generates a <collection:units param/> tag for the Activities show
page. If I manually change it to <sortable-collection:units param/>, I
get the following error:

undefined method `reorder_units_url'

Am I missing the gist of what you mean, or am I missing a step? Do I
need to pass something to sortable-collection?

Thanks,

On Jun 9, 1:32 pm, kevinpfromnm <[email protected]> wrote:
> You want the acts_as_list and accessible on the join table, not the
> end table.  that way, each item can be sorted per document.
>
> On Jun 9, 9:08 am, Ronbo <[email protected]> wrote:
>
> > Hi all,
>
> > I am still very new to Hobo, and learning mostly through trial and
> > error. I have been creating small throw-away apps to explore and test
> > things out.
>
> > I do have a serious app in mind though, and I am trying to figure out
> > how to implement a specific workflow in which users will create new
> > documents and add boilerplate text pieces to them from a predefined
> > set. Since documents will have many pieces and a piece can belong to
> > many documents, my first hunch is that I would use a
>
> > has_many :through => x, :accessible => true
>
> > sort of relationship, with the pieces as children of the document
> > model. Users could create a new doc and add the pieces they want.
> > Where I am having problems prototyping this is that the pieces in the
> > doc should be sortable. I've hunted through the hobo and rails forums
> > and can't find a recipe for how to make acts_as_list work with a
> > joined many-to-many sort of relationship.
>
> > Is this possible? If so, is there a better way of defining the
> > relationship or some special magic to getting it working through a
> > join?
>
> > Any hints are much appreciated.

-- 
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.

Reply via email to