My setup: Rails 3.0.9, Ruby 1.9.2, jQuery 1.6.2
I’m making an AJAX call from jQuery to my Rails app to this controller
class ProjectsController
def data
@project = ....
respond_to do |format|
format.html
end
end
end
For the data action, I need to render a partial file in the views\projects\_property.html.erb. What’s the syntax for format.html? I tried a variety of ways but couldn’t find the right syntax.
For ajax:
And in data.js.erb