Over a million developers have joined DZone.

Developer Info On Every Page

DZone's Guide to

Developer Info On Every Page

· ·
Free Resource
First, make a file in your /app/views/common_partials folder called ‘_developer_info.html.erb’

Into this, throw the following:

 Show Developer Info


The above code sets up a hidden div in your view with a link at the bottom right. When you click the link it makes the hidden div visible (which is absolutely positioned over the top of all your content) and gives you a link to click it away again. Neat.

Now, to make all this Rails-foo goodness work, add the following to the very bottom of your application.html.erb file, just before the  tag is good.

<%- if RAILS_ENV == "development" -%>
  <%= render :partial => 'common_partials/developer_info' %>
<%- end -%>


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}