14 lines
512 B
Text
14 lines
512 B
Text
:ruby
|
|
url = if field.resource.class.name == 'Instructeur'
|
|
enable_feature_manager_instructeur_path(field.resource.id)
|
|
else
|
|
enable_feature_manager_administrateur_path(field.resource.id)
|
|
end
|
|
|
|
%table#features
|
|
- admin_features = Flipflop.feature_set.features.reject{ |f| f.group.try(:key) == :production }
|
|
- admin_features.each do |feature|
|
|
%tr
|
|
%td= feature.title
|
|
%td
|
|
= check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key }
|