File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1212/test /dummy /tmp /development_secret.txt
1313
1414.byebug_history
15+
16+ .DS_Store
Original file line number Diff line number Diff line change @@ -4,10 +4,13 @@ module RakeUi
44 class ApplicationController < ActionController ::Base
55 before_action :black_hole_production
66
7+ STAGING_OK = ( Rails . env . staging? && RakeUi . configuration . allow_staging )
8+ PROD_OK = RakeUi . configuration . allow_production
9+
710 private
811
912 def black_hole_production
10- return if Rails . env . test? || Rails . env . development? || RakeUi . configuration . allow_production
13+ return if Rails . env . test? || Rails . env . development? || STAGING_OK || PROD_OK
1114
1215 raise ActionController ::RoutingError , "Not Found"
1316 end
Original file line number Diff line number Diff line change 44
55module RakeUi
66 mattr_accessor :allow_production
7+ mattr_accessor :allow_staging
8+
79 self . allow_production = false
10+ self . allow_staging = true
811
912 def self . configuration
1013 yield ( self ) if block_given?
You can’t perform that action at this time.
0 commit comments