demarches-normaliennes/app/views/fields/features_field/_show.html.haml
2019-09-10 16:10:14 +02:00

11 lines
391 B
Text

:ruby
group = field.resource.class.name.downcase
user = field.resource.user
url = enable_feature_manager_user_path(user)
%table#features
- Flipper.features.select { |feature| feature.key.start_with?("#{group}_") }.each do |feature|
%tr
%td= feature
%td
= check_box_tag "enable-feature", "enable", feature.enabled?(user), data: { url: url, key: feature.key }