-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add flipper feature flags * fix rubocop
- Loading branch information
1 parent
5381713
commit 821f299
Showing
6 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class CanAccessFlipperUI | ||
def self.matches?(request) | ||
current_user = request.env["warden"].user | ||
current_user.present? | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class CreateFlipperTables < ActiveRecord::Migration[7.0] | ||
def self.up | ||
create_table :flipper_features do |t| | ||
t.string :key, null: false | ||
t.timestamps null: false | ||
end | ||
add_index :flipper_features, :key, unique: true | ||
|
||
create_table :flipper_gates do |t| | ||
t.string :feature_key, null: false | ||
t.string :key, null: false | ||
t.string :value | ||
t.timestamps null: false | ||
end | ||
add_index :flipper_gates, %i[feature_key key value], unique: true | ||
end | ||
|
||
def self.down | ||
drop_table :flipper_gates | ||
drop_table :flipper_features | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.