Duncan Bayne
2007-Jan-16 20:38 UTC
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:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
height="300" id="overview_graph"
style="border:none;display:inline"
width="300"><param name="movie"
value="/charts/charts.swf?library_path=/charts/charts_library&xml_source=/graph/graph?start_date=1136026800.0&amp;graph_id=1&amp;end_date=1198234800.0&amp;size=300"></param><param
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="http://www.macromedia.com/go/getflashplayer"
quality="high"
src="/charts/charts.swf?library_path=/charts/charts_library&xml_source=/graph/graph?start_date=1136026800.0&amp;graph_id=1&amp;end_date=1198234800.0&amp;size=300"
swLiveConnect="true" type="application/x-shockwave-flash"
width="300"></embed></object>
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 :-)
Yours,
Duncan Bayne
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Chris Wanstrath
2007-Jan-17 10:18 UTC
Re: Can''t pass parameters to Ziya controller using url_for
On 1/16/07, Duncan Bayne <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 http://errtheblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---