I am wondering if this is just me or…?
I have a partial contacts/_contact_details.html.erb that works fine when
rendering for a html request. When I make a js request and have the
render :partial within the controller code it fails and tells me it was
unable to find the file.
Here is the controller code:
def show
@contact = Contact.find(params[:id])
respond_to do |format|
format.html
format.js { render :partial => “contacts/contact_details”, :object
=> @contact }
end
end
There is a post to the rails trac regarding this where the solution is
said that partials should have a extension of .rhtml rather than
html.erb
The post can be found here http://dev.rubyonrails.org/ticket/10113
Is this correct or rather is this they way it is supposed to be? In all
the 2.x docs I have seen partials have the html.erb extention.
If I change the partial file to _contact_details.rhtml it works as it
should for both js and html requests.
Thanks