README.md in feature_gate-0.1.2 vs README.md in feature_gate-0.1.3

- old
+ new

@@ -20,10 +20,12 @@ mount FeatureGate::Engine, at: '/feature_gate' ## Usage +### Gating features + All gates are closed by default, meaning the features you gate will be hidden until you toggle the gates open. In view files: <% FeatureGate::Manager.gate('gate-name') do %> @@ -34,9 +36,25 @@ In controller actions: def index FeatureGate::Manager.gate_page('gate-name') # 404s if gate is closed end + +### Managing gates + +#### Option 1: UI interface + +<img src="http://i.imgur.com/aeRlKv0.png" border="1"> + +Go to `/feature_gate` for a preconfigured page that lists all your gates and give you the ability to toggle them open or close. + +To limit accessibility to this page, define `feature_gate_control_allowed?` in `application_controller.rb`. If the method is not defined, `/feature_gate` will be accessible to <em>all</em> users. + + def feature_gate_control_allowed? + # condition for allowing user to toggle feature gates, ex: current_admin_user.present? + end + +#### Option 2: Console To deploy your feature: FeatureGate::Manager.open!('gate-name')