I am trying to render a view from the current one using jquery. I am using flexigrid for my project and I want to code for the info button.
Here is my view. Using jquery I am calling the following,
var name = $('.trSelected .sorted div').html();
$.post("/contacts/display_info/", {file_as : name});
My controller is the following. Tried debugging also.
def display_info
@contact = Contacts.find_by_file_as(params[:file_as])
puts "---------------"
puts @contact.id
puts "---------------"
render(:action => 'display_info' , :id => @contact.id)
end
And here is my console:
Cant figure out what is the problem. Please help!