Module: RailsFeatureFlip::Helper
- Defined in:
- lib/rails_feature_flip/helper.rb
Overview
Provides feature_enabled? helper for controllers and views.
Instance Method Summary collapse
-
#feature_enabled?(name) ⇒ Boolean
Checks whether a feature is enabled.
Instance Method Details
#feature_enabled?(name) ⇒ Boolean
Checks whether a feature is enabled.
15 16 17 18 |
# File 'lib/rails_feature_flip/helper.rb', line 15 def feature_enabled?(name) feature = Rails.configuration.x.features.public_send(name) feature.respond_to?(:enabled?) && feature.enabled? end |