Browse Source

Extract feature toggle

pull/976/head
Kat 4 years ago
parent
commit
47346cfbd8
  1. 2
      app/views/locations/show.html.erb
  2. 6
      config/initializers/feature_toggle.rb

2
app/views/locations/show.html.erb

@ -23,6 +23,6 @@
<% end %>
</div>
</div>
<% if !Rails.env.production? %>
<% if FeatureToggle.location_toggle_enabled? %>
<%= govuk_button_link_to "Deactivate this location", location_deactivate_path(location_id: @location.id, id: @scheme.id), warning: true %>
<% end %>

6
config/initializers/feature_toggle.rb

@ -14,4 +14,10 @@ class FeatureToggle
false
end
def self.location_toggle_enabled?
return true unless Rails.env.production?
false
end
end

Loading…
Cancel
Save