Firstly, I'm using 2.1.5 of Ziya and Rails 2.3.5
Using the sample code, I have a blee controller with a callback called
load_chart. My initial routes.rb has this line:
map.load_chart '/blee/load_chart', :controller => 'blee', :action =>
'load_chart'
And my index.html.erb for blee looks like:
<%= ziya_chart load_chart_url, :width=>400, :height=>750 -%>
So what I've tried is modifying my routes.rb file to this:
map.load_chart '/blee/load_chart/:sort', :controller =>
'blee', :action => 'load_chart'
but that results in Rails complaining about an ambiguous route.
I tried modifying my index.html.erb to something like this:
<%= ziya_chart
load_chart_url, :width=>400, :height=>750, :sort=>'MySortParameter' -
%>
hoping that I could pull off the parameter inside load_chart by using
params[:sort], but that just showed nil.
I've tried various other combinations and permutations and nothing
seems to work. A search of the forum doesn't show much, which tells me
I'm doing this completely wrong.
Can anyone point me in the right direction?
Cool ! You should be pretty close.
Just change the line to this
<%= ziya_chart load_chart_url
( 'my_sort_param'), :width=>400, :height=>750 -%>
You should now get params[:sort] in your controller.
-Fernand