what am I doing wrong with the following Ajax request...?
The link/call:
<%= link_to 'Business Analysis', it_business_analysis_path, :remote => true %>
The route:
match 'it/business_analysis' => 'informationtechnology#business_analysis', :as => :it_business_analysis
The controller:
class InformationtechnologyController < ApplicationController
def business_analysis
render :update do |page|
page.replace_html 'page_content', :partial => 'business_analysis'
end
end
end
The view:
<div id="page_content">
</div>
The partial is called:
_business_analysis.html.erb
The ERROR:
Action Controller: Exception caught
<h1>Template is missing</h1>
<p>Missing template informationtechnology/update, application/update with {:formats=>[:js, "application/ecmascript", "application/x-ecmascript", :html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json], :handlers=>[:builder, :coffee, :erb], :locale=>[:en, :en]}. Searched in: * "/home/<user_name>/Websites/<project_name>/app/views"
It seems Rails is looking for a view called "update" - why and how do I fix this?
Thanks a lot! Tom