Method: Pageflow::FeatureTarget#feature_states=
- Defined in:
- app/models/concerns/pageflow/feature_target.rb
#feature_states=(states) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 |
# File 'app/models/concerns/pageflow/feature_target.rb', line 25 def feature_states=(states) boolean_states = states.each_with_object({}) do |(key, value), result| result[key] = (value == true || value == STATE_MAPPING[true]) end self.features_configuration = features_configuration.merge(boolean_states) end |