I have a controller like so:
def index
respond_to do |format|
format.html {}
format.js {render :layout => false}
end
end
index.html.erb
hello i"m index.html.erb
index.js.erb
<%= render :template => "dashboard/index" %>
What I want to do is have index.html or index.js return the same thing. But I can’t see to do that without making index.html.erb a partial (_index.html.erb) but then when a user makes an html call that won’t work.
How can I get the index.js.erb to render index.html.erb? which I would then escape with jQuery. Thanks
Try: