CLEAN and DRY

is it possible to include a partial from within the global
application.html.erb?

I have a google ad in my application.html.erb I would like to move
it to a partial _google.html.erb in my layouts directory to keep
things CLEAN.. but i guess ERB is only looking in the current views
directory not the layouts dir.. would not make sense to move it to a
partial and then duplicate the _google.html.erb in all views, thats
not very DRY..

You can do something like this:

   render :partial => 'your_directory/view_name'

So if you wanted to put _google.html.erb in the app/views/shared
directory, you would do:

   render :partial => 'shared/google'

--Jeremy

I often create a shared directory in app/views for such things. In your
case, you'd have app/shared/_google.html.erb and refer to it as:

<%= render :partial => '/shared/google' %>

--Greg