Skip to content

Commit 05eca7e

Browse files
committed
Add rails_db.rb initializer
1 parent ebacf81 commit 05eca7e

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

files/rails_db.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
if Object.const_defined?("RailsDb")
2+
RailsDb.setup do |config|
3+
# # enabled or not
4+
# config.enabled = Rails.env.development?
5+
6+
# # automatic engine routes mounting
7+
# config.automatic_routes_mount = true
8+
9+
# set tables which you want to hide ONLY
10+
config.black_list_tables = ["ar_internal_metadata"]
11+
12+
# set tables which you want to show ONLY
13+
# config.white_list_tables = ['posts', 'comments']
14+
15+
# # Enable http basic authentication
16+
# config.http_basic_authentication_enabled = false
17+
18+
# # Enable http basic authentication
19+
# config.http_basic_authentication_user_name = 'rails_db'
20+
21+
# # Enable http basic authentication
22+
# config.http_basic_authentication_password = 'password'
23+
24+
# # Enable http basic authentication
25+
# config.verify_access_proc = proc { |controller| true }
26+
end
27+
end

template.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ def render_file(filename)
244244

245245
# Better backtraces
246246
file "config/initializers/nicer_errors.rb", render_file("nicer_errors.rb")
247+
file "config/initializers/rails_db.rb", render_file("rails_db.rb")
247248

248249
file "config/initializers/active_record/relation/delegation_patch.rb", render_file("delegation_patch.rb")
249250
file "config/initializers/active_record/relation/calculations_patch.rb", render_file("calculations_patch.rb")

0 commit comments

Comments
 (0)