Nope, that won't work because the named route doesn't take or expect a real 
parameter and you're providing it your offer_id.

Try this:

link_to("add refurbishment", '@offer_refurbishment_new', array('query_string' 
=> 'offer_id='.$offer->getId()))

But you'd be much better served if you just redefined the 
offer_refurbishment_new route like this:

offer_refurbishment_new:
  url:     /offer_refurbishment/new/:offer_id.:sf_format
  class:   sfPropelRoute
  options: { model: OfferRefurbishment, type: object }
  param:   { module: offer_refurbishment, action: new, sf_format: html }
  requirements: { sf_method: get, offer_id: '\d+' }

Add this rule below your PropelRouteCollection rule for offer_refurbishment. 
Please check if the model I put up there is correct. Having done this, you can 
use this: link_to("add refurbishment", 
'@offer_refurbishment_new?offer_id='.$offer->getId())


Cheers, Daniel

On 05.10.2010, at 16:32, Christian wrote:

> link_to("add refurbishment", '@offer_refurbishment_new?offer_id='.
> $offer->getId())

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to