I don't think it's going to be a routing issue for this... I would
probably look at making a lifecycle to handle the copy process and/or
you might need to add hidden variables in the form(s) to specify
targets.

On Jun 22, 7:36 am, Ronbo <[email protected]> wrote:
> Looking at that post, I should add some details.
>
> URLs look like:
>
> http://localhost:3000/activities/3/duplicado/1-hiring-initiativehttp://localhost:3000/activities/5/duplicado/1-hiring-initiativehttp://localhost:3000/activities/2/duplicado/1-hiring-initiative
>
> instead of
>
> http://localhost:3000/activities/3/duplicado/4-something-else, etc
>
> Here is the route:
>
> map.duplicado 'activities/:activity_id/duplicado/:id', :controller =>
> 'activities', :action => 'duplicado', :has_many
> => :units#, :path_prefix => '/activities/:activity_id'
>
> On Jun 21, 7:07 pm, Ronbo <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > I have a scenario where users will create new documents, documents
> > will have sections, and users can add boilerplate content to each
> > section. Users will also be able to make a local (editable) copy of
> > the pieces of content.
>
> > I want to present this to the users as a single page, with the
> > document, sections and pieces all available and editable without a lot
> > of navigating. I do this by rendering the section collection on the
> > project page, and the piece collection on each section card.
>
> > I have most of this working, but for creating a copy of a piece of
> > content, I need to update the link table that joins the piece of
> > content to the section. What I do is 1. create a copy of the piece,
> > flag the copy as editable and then change the piece_id on the join and
> > refresh the page.
>
> > but ... the urls constructed for my "copy" link, which includes the
> > piece_id, the action name and the section_id *all* have the section id
> > for the first section on the page, regardless of which section a piece
> > is in. So if I click "copy" on piece 4 in section 3, the controller
> > tries to make a copy of piece 4  in section 1.
>
> > Any ideas?
>
> > Thanks,

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