demarches-normaliennes/app/views/fields/features_field/_show.html.haml

12 lines
391 B
Text
Raw Normal View History

2018-11-08 17:13:48 +01:00
:ruby
2019-07-04 12:36:17 +02:00
group = field.resource.class.name.downcase
user = field.resource.user
url = enable_feature_manager_user_path(user)
2018-11-08 17:13:48 +01:00
%table#features
2019-07-04 12:36:17 +02:00
- Flipper.features.select { |feature| feature.key.start_with?("#{group}_") }.each do |feature|
%tr
2019-07-04 12:36:17 +02:00
%td= feature
%td
2019-07-04 12:36:17 +02:00
= check_box_tag "enable-feature", "enable", feature.enabled?(user), data: { url: url, key: feature.key }