On Aug 7, 2012, at 7:03 AM, Manish Nautiyal wrote:
> I'm using rails 3.2.1 with jquery for an ajax call.
>
> My juqery code is :
>
> jQuery.ajax({
> url: "/org_pages",
> data: 'org_id='+ org_id,
> type: "POST",
> success: function(result){
> jQuery("#image_center").html("<%=
> escape_javascript(render(:partial => 'pages/top_link')) %>");
> },
> error: function(){
> alert('Error occured');
> }
> });
>
> My problem is on the web page the output is showing this :
>
> <%= render :partial => 'pages/top_link', :collection=>@pages %>
>
> How it should display my render partial page. :(
What is the file-extension of the script you posted? Does it include .erb as
the last segment? If not, then the erb code won't be evaluated at all.
Walter
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.