Feature flags aren't just for features any more.
Remove the friction from countless development tasks and tools with controls for anything in personal development environments.
Internal Tools
Enable team members to toggle internal tools like performance monitoring, analytics, or chat widgets in their development environment.
class ApplicationController < ActionController::Base
before_action :setup_rack_mini_profiler
private
def setup_rack_mini_profiler
if Flipper.enabled?(:rack_mini_profiler, current_user)
Rack::MiniProfiler.authorize_request
end
end
end
Circuit Breakers & Maintenance
Use feature flags to disable individual features for maintenance while leaving other functionality unaffected. For example, if you're making significant updates to your search indexing, you can temporarily disable the search interface while the rest of the application can still be fully usable. So instead of fielding endless support questions or taking your application offline, you can temporarily turn off search while leaving everything else unaffected.
if Flipper.enabled?(:search)
# Enable Search UI in Views
else
# Disable Search UI in Views
# - Show maintenance tooltip with estimated return
end
Fast Backup Provider Cutovers
Leverage controls to make it easier to swap to backup providers any time your primary vendor is down or sluggish. For example, when using a third-party email provider, you'll like have a preferred vendor, but even the best apps occasionally have issues. With Flipper, you can set up a backup vendor, and then if your primary provider has any temporary issues, you can quickly cutover to your backup provider. Since Flipper Cloud is optimized for mobile, you can even make the change from your phone.
class EmailProvider
def current
Flipper.enabled?(:backup_email_provider) ? secondary : primary
end
def primary
# Preferred Vendor Details
end
def secondary
# Backup Vendor Details
end
end
Block Bad Actors
Every web app eventually has to deal with bad actors. Whether intentional or unintentional, if a single user causes problems, you can temporarily disable access for only that user—either for a single feature or for your entire application. Feature flags can work with individuals actors or a group of "bad actors" to provide a way to disable access to specific features for specific users. For example, if a bot is spamming your contact form, you can replace the contact form with a message that it's temporarily offline for maintenance—but only for that specific user.
Flipper.register(:bad_actors) do |actor, context|
actor.respond_to?(:bad_actor?) && actor.bad_actor?
end
Flipper.disable_group :contact_form, :bad_actors
if Flipper.enabled?(:contact_form, current_user)
# Show contact form
else
# Show maintenance message for just that user
end
Get audit history, rollbacks, advanced permissions, analytics, and all of your projects in one place.
You can choose from several tiers to sponsor Flipper on GitHub and get some great benefits!