Sha256: 233ac9c0f37d6797ccfab106a1d5885a039b96ec47c2ea006b9a0682791203e3

Contents?: true

Size: 407 Bytes

Versions: 26

Compression:

Stored size: 407 Bytes

Contents

require_relative "./ar_setup"

# Requires the flipper-active_record gem to be installed.
require 'flipper/adapters/active_record'

adapter = Flipper::Adapters::ActiveRecord.new
flipper = Flipper.new(adapter)

flipper[:stats].enable

if flipper[:stats].enabled?
  puts "Enabled!"
else
  puts "Disabled!"
end

flipper[:stats].disable

if flipper[:stats].enabled?
  puts "Enabled!"
else
  puts "Disabled!"
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
flipper-active_record-0.21.0.rc1 examples/active_record/basic.rb
flipper-active_record-0.20.4 examples/active_record/basic.rb
flipper-active_record-0.20.3 examples/active_record/basic.rb
flipper-active_record-0.20.2 examples/active_record/basic.rb
flipper-active_record-0.20.1 examples/active_record/basic.rb
flipper-active_record-0.20.0 examples/active_record/basic.rb
flipper-active_record-0.20.0.beta3 examples/active_record/basic.rb
flipper-active_record-0.20.0.beta2 examples/active_record/basic.rb
flipper-active_record-0.20.0.beta1 examples/active_record/basic.rb
flipper-active_record-0.19.1 examples/active_record/basic.rb
flipper-active_record-0.19.0 examples/active_record/basic.rb
flipper-active_record-0.18.0 examples/active_record/basic.rb
flipper-active_record-0.17.2 examples/active_record/basic.rb
flipper-active_record-0.17.1 examples/active_record/basic.rb
flipper-active_record-0.16.2 examples/active_record/basic.rb
flipper-active_record-0.16.1 examples/active_record/basic.rb
flipper-active_record-0.16.0 examples/active_record/basic.rb
flipper-active_record-0.15.0 examples/active_record/basic.rb
flipper-active_record-0.14.0 examples/active_record/basic.rb
flipper-active_record-0.13.0 examples/active_record/basic.rb