Feature Flags Demo
This page demonstrates the feature flags system in Rails Blueprint Pro.
Welcome to the Feature Flags demonstration! This page shows how feature flags work in practice.
Basic Feature Toggle
Feature Disabled This content is shown when the 'demo_feature' flag is disabled.
User-Specific Features
Please Login to see user-specific features.
Beta Features
Standard UI
The standard interface is shown when beta features are disabled.
Role-Based Features
Role-based features require authentication.
Feature Status Information
Current Feature States:
- demo_featureDisabled
- beta_uiDisabled
Implementation Examples
In Views:
- with_feature(:feature_name) do
.content
| This content only shows when feature is enabled
- without_feature(:feature_name) do
.fallback
| This shows when feature is disabled
In Controllers:
class MyController < ApplicationController
before_action -> { require_feature!(:premium_access) }
def show
if feature_enabled?(:new_algorithm)
# Use new implementation
else
# Use old implementation
end
end
end