Hi All,
I have a section of code in a controller that replaces existing HTML with an IMG tag. The code is as follows:
render :update do |page|
page.replace_html "chart-div", "<img src=\"#{chart.chart_file}\"/>" #chart.chart_file is a path
end
For whatever reason, I keep receiving the following error:
ActionController::RoutingError (No route matches "/public/charts/1_WEEKLY_ACTUAL_LINE.jpg" with {:method=>:get}):
I have NO idea why it's assuming I want to route somewhere. It seems that I must have the "public" on the beginning in order for the file to be properly created, however I must remove "public" in order to display the image. Any thoughts? Is there a more standard mechanism by which to deal with dynamically created images/items?
Best.
NOTE: Please no "upload" plugins. All files are created by the system, there are no uploads.