Flipper Cloud

Read-only adapter

A read-only adapter for Flipper.

Use this adapter to wrap another adapter and raise an exception for any writes.

Any attempted write raises Flipper::Adapters::ReadOnly::WriteAttempted with message 'write attempted while in read only mode'


# example wrapping memory adapter
require 'flipper/adapters/read_only'

Flipper.configure do |config|
  config.adapter do

# Enabling a feature
> Flipper[:dashboard_panel].enable
=> Flipper::Adapters::ReadOnly::WriteAttempted: write attempted while in read only mode
Start flipping features with Flipper Cloud to get support, audit history, finer-grained permissions, multi-environment sync, and all of your projects in one place.

Prefer our open source Cloudless option? You can also choose from several tiers to sponsor Flipper on GitHub.

On This Page: