flippercloud / flipper

🐬 Beautiful, performant feature flags for Ruby.
https://www.flippercloud.io/docs
MIT License
3.67k stars 411 forks source link

Flipper UI crashes if feature key contains a '/' #357

Closed alainravet closed 6 years ago

alainravet commented 6 years ago

How to reproduce:

Step 1 : create a key in the console

  bin/rails c
  > Flipper.enabled? 'a/b'
    => false
  > Flipper.enable 'a/b'
    => true
  > Flipper.enabled? 'a/b'
    => true

Step 2 : try and edit the feature in flipper ui

 open https://mydomain.com/features/features
 click on the 'a/b' key
 -> https://mydomain.com/features/features/a/b
                                           ^^^

result (in the browser)

  Flipper::UI::Actions::Gate does not support request method "get"
jnunemaker commented 6 years ago

I think I've always imagined that feature keys would be string/number, but I don't think it is enforced. I'll take a stab at making this work. If someone else gets itchy first, feel free.