Forum: Ruby on Rails Can't pass parameters to Ziya controller using url_for

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Efa5e524e4fe6a096349cf93688a0a35?d=identicon&s=25 Duncan Bayne (duncan-bayne)
on 2007-01-16 21:38
Hi All,

I'm stuck yet again.  I have an action on a controller that produces a
Ziya graph, which I call using the gen_chart() helper.  However, I can't
seem to pass more than one parameter through to the action.

<%= gen_chart( "overview_graph",
    url_for( :controller => 'graph', :action => 'graph', :graph_id =>
GraphController::GRAPH_OVERVIEW, :start_date =>
@report_params[:budget_period][:start_date].to_f, :end_date =>
@report_params[:budget_period][:end_date].to_f, :size => 300 ),
    300 ) %>

This just doesn't work, however.  The start date is passed through to
the underlying action, but the rest of the parameters aren't.  The HTML
generated by the gen_chart() helper is as follows:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
height="300" id="overview_graph" style="border:none;display:inline"
width="300"><param name="movie"
name="quality" value="high"></param><param name="bgcolor"
value="#ffffff"></param><param name="border" value="0px"></param><embed
bgcolor="#ffffff" height="300" name="overview_graph"
pluginspage="" quality="high"
swLiveConnect="true" type="application/x-shockwave-flash"

I think the problem may have something to do with the encoding of the &
characters in the URL, but I'm not certain.

Anyone got this going themselves & care to shed some light on what I'm
doing wrong? TIA :-)

Duncan Bayne
B8dbb1987e8e5318584865f880036796?d=identicon&s=25 Chris Wanstrath (defunkt)
on 2007-01-17 11:19
(Received via mailing list)
On 1/16/07, Duncan Bayne <> wrote:

> I think the problem may have something to do with the encoding of the &
> characters in the URL, but I'm not certain.

Try passing :escape => false to url_for.

Chris Wanstrath
This topic is locked and can not be replied to.