Open dfguo opened 10 years ago
Probably just legacy, as iirc, that wasn't available when I originally wrote this. Switching it over would be great.
I have some trouble understanding few parts of the code and can't proceed with the refactoring. Particularly with monkey_patch.rb
def active?(feature, user=nil)
RolloutUi::Wrapper.new(self).add_feature(feature)
original_active?(feature, user)
end
why do we add the feature in here?
If you use redis namespace, redis.smembers(:features) will not work. I changed it to @rollout.features, but it breaks a bunch of tests.
I'm not entirely sure why we need to have #add_feature in wrapper.rb, so I'm really having trouble refactoring it. What's the reason behind using redis.smembers(:features) instead of @rollout.features? Thanks!