I had a link in the page. I am using jquery to call an action in rails 3. For that i had given
<%= link_to "Publish",'',:id=>"view_code#{counter}",:remote=>true %>
<%= javascript_tag do %>
jQuery(function($) {
$("#view_code<%= "#{counter}" %>").click(function() {
$.post("/yanas/publish/<%= id %>", function(data) {
$("#(publish<%= "#{counter}" %>)").html(data);
});
});
});
<% end %>
Now what happens is that, the request is going as / The message in the teminal is
Processing by YanasController#publish as * / *
and in the publish action i wrote
respond_to do |format|
format.html { render :partial => 'publish' }
end
But I am not displayed the content in the browser.In the terminal, I am getting
Rendered yanas/_publish.html.erb (0.8ms)
How I solve this?