# Google adsense breaks render :partial =\>

**URL:** <https://www.ruby-forum.com/t/google-adsense-breaks-render-partial/166636>\
**Category:** Rails\
**Created:** [April 28, 2009, 2:00am UTC](https://www.ruby-forum.com/t/google-adsense-breaks-render-partial/166636 "2009-04-28T02:00:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [April 28, 2009, 2:00am UTC](https://www.ruby-forum.com/t/google-adsense-breaks-render-partial/166636/1 "2009-04-28T02:00:18Z")

</div>

Hey everybody, i’ve got a control that returns a partial, no biggie.  
Except when that partial contains the javascript for my adsense account.  
Then the partial renders correctly, and then quickly replaces my page  
with nothing by the ad. When i take away my adsense js, everything works  
great. Has anyone encountered this before, or know how to get around it?

def submit\_remote\_form  
render :partial =\> “my\_partial”  
end

#views /my\_partial

\<% remote\_form\_for :action =\> :submit\_remote\_form do |f| %\>  
\<%= f.text\_field :something %\>

\<%= f.submit “submit” %\>

```
<script type="text/javascript"><!--
google_ad_client = "";
/* WhySpam Square */
google_ad_slot = "";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

```

\<% end %\>

I know i could get around this by taking out the adsense js, but that  
would require “creative” (to say the least) html/css design to get the  
same result.
