Use StringInquirer for Readable Predicate Methods

You’ve probably seen Rails.env.production? in your codebase to ensure that certain code only runs in production. Instead of having to compare strings, Rails.env == "production" , Rails wraps the string in an ActiveSupport::StringInquirer so you get readable methods like .production? and .development? . Active Support also adds an inquiry method to String so you can use this same pattern in your…