Skip to content

Commit

Permalink
Use clear for boolean gate.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Feb 20, 2013
1 parent 63e0644 commit ec71181
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/flipper/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def disable(thing = Types::Boolean.new(false))
gate = gate_for(thing)
payload[:gate_name] = gate.name

adapter.disable self, gate, gate.wrap(thing)
if gate.is_a?(Gates::Boolean)
adapter.clear self
else
adapter.disable self, gate, gate.wrap(thing)
end
}
end

Expand Down

0 comments on commit ec71181

Please sign in to comment.