Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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 -%>

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}