Can't pass parameters to Ziya controller using url_for

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 ),
#ffffff”,
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:

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

Yours,
Duncan B.

On 1/16/07, Duncan B. [email protected] 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 W.
http://errtheblog.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs