Sha256: 54288299f193096e61147440a78bd46fcbdd8b044564bc38c16bb3be6676fd85
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 Bytes
Contents
module Flipper module Model module ActiveRecord # The id of the record when used as an actor. # # class User < ActiveRecord::Base # end # # user = User.first # Flipper.enable :some_feature, user # Flipper.enabled? :some_feature, user #=> true # def flipper_id "#{self.class.base_class.name};#{id}" end # Properties used to evaluate expressions def flipper_properties {"type" => self.class.name}.merge(attributes) end end end end
Version data entries
10 entries across 10 versions & 2 rubygems