I am trying to have a json response in which some value is html rendered by a partial
#projects_Controller.rb
def index
respond_to do |f|
f.json
en
I'm not sure if I got you right, but maybe you can play with the content type like this:
disclaimer = {
"html":"<%= raw escape_javascript(render :partial => 'projects/disclaimer', :content_type => 'text/html'), :locals => {:localVariable => @localVariable} %>"
}
The :locals is just if you want to pass an var to the partial.