mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Add feature toggle helper, allow hash or string queries
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
module ApplicationHelper
|
||||
include FoundationRailsHelper::FlashHelper
|
||||
|
||||
def feature?(feature)
|
||||
OpenFoodNetwork::FeatureToggle.enabled? feature
|
||||
end
|
||||
|
||||
def ng_form_for(name, *args, &block)
|
||||
options = args.extract_options!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module OpenFoodNetwork
|
||||
class FeatureToggle
|
||||
def self.enabled? feature
|
||||
features[feature]
|
||||
features.with_indifferent_access[feature]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user