We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

capitalist on 08/07/07


Tagged

rails helper


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

frankyfish
cczona


Rails helper to check if you're in dev mode.


Published in: Rails 


override the boolean expression with your own conditions.

  1. def dev_mode?
  2. ENV['RAILS_ENV'] == 'development' && request.host == '127.0.0.1'
  3. end

Report this snippet 

You need to login to post a comment.