1. The page is loaded and the chart is displayed. (Via a partial
called "chart")
2. The user clicks a checkbox which triggers a call to an action (via
observe_field) that recalculates the data for the chart. Now I want to
re-draw the chart.
Just calling the same code that renders the chart on the first load
doesn't work. (Didn't think it would, but I tried). I then tried
adding this code after it:
if request.xhr? then
render :update do |page|
page.replace_html( "chart", :partial => "chart")
end
end
But that doesn't do anything either. I'm sure it's something stupid
and silly that I'm missing, but I'm still getting used to Rails and
I'm not sure what I don't know. Thanks for any pointers or tips.