here this 
*format.json { render :json => @cnames }*
 from the controller searchskill. this @cnames is a hash, so how to give 
each value from that @cnames using itetrate in .html()

can i give anything like this...
*like this  $('.searchmodal').( <%= @cnames .each do |doc| %> +'<label>'+ 
<%= doc.name %>+' </label>'+ <% end %>  );  *

*Ajax file*

$.ajax({
type: "POST",
url: "http://127.0.0.1:3000/users/searchskill";,
data: dataString,
datatype: "json",
success: function(response){

*//.html*


}
});
}

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/I9b05S1LspMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to