Thursday, January 5, 2012

Re: [Rails] js update partial missing template

On Jan 5, 2012, at 4:41 PM, Javier Quarite wrote:

>
>
> On Thu, Jan 5, 2012 at 5:18 PM, Craig White <craig.white@ttiltd.com> wrote:
>
> app/views/permissions/add_member.js.erb
> $('#privileges').replaceWith("<%= escape_javascript(render(@permissions)) %>");
>
> Sorry if my question is not about the main problem but, could you explain why are you using .replaceWith()?
>
> Usually I use $("#myDiv").html("<%= escape_javascript(render "partial", locals)%>
>
> Do you find replaceWith() better than html() ??
>
> Thanks in advance
----
actually I am using replaceWith in some places in my js code itself but the code in add_member.js.erb isn't getting executed at all and it's responding to html instead.

Craig

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate