railties 6.0.0 → 7.1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +699 -245
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.md +99 -0
  5. data/README.rdoc +7 -8
  6. data/lib/minitest/rails_plugin.rb +80 -2
  7. data/lib/rails/all.rb +0 -1
  8. data/lib/rails/api/task.rb +37 -5
  9. data/lib/rails/app_updater.rb +9 -6
  10. data/lib/rails/application/bootstrap.rb +52 -14
  11. data/lib/rails/application/configuration.rb +327 -86
  12. data/lib/rails/application/default_middleware_stack.rb +33 -7
  13. data/lib/rails/application/dummy_config.rb +19 -0
  14. data/lib/rails/application/finisher.rb +94 -113
  15. data/lib/rails/application/routes_reloader.rb +17 -3
  16. data/lib/rails/application.rb +258 -201
  17. data/lib/rails/application_controller.rb +3 -4
  18. data/lib/rails/autoloaders/inflector.rb +21 -0
  19. data/lib/rails/autoloaders.rb +42 -42
  20. data/lib/rails/backtrace_cleaner.rb +13 -8
  21. data/lib/rails/cli.rb +5 -2
  22. data/lib/rails/code_statistics.rb +6 -4
  23. data/lib/rails/code_statistics_calculator.rb +16 -7
  24. data/lib/rails/command/actions.rb +10 -12
  25. data/lib/rails/command/base.rb +66 -46
  26. data/lib/rails/command/behavior.rb +3 -3
  27. data/lib/rails/command/environment_argument.rb +33 -17
  28. data/lib/rails/command/helpers/editor.rb +17 -12
  29. data/lib/rails/command.rb +90 -32
  30. data/lib/rails/commands/about/about_command.rb +14 -0
  31. data/lib/rails/commands/application/application_command.rb +2 -0
  32. data/lib/rails/commands/console/console_command.rb +17 -13
  33. data/lib/rails/commands/credentials/USAGE +54 -39
  34. data/lib/rails/commands/credentials/credentials_command/diffing.rb +53 -0
  35. data/lib/rails/commands/credentials/credentials_command.rb +83 -60
  36. data/lib/rails/commands/db/system/change/change_command.rb +8 -2
  37. data/lib/rails/commands/dbconsole/dbconsole_command.rb +39 -124
  38. data/lib/rails/commands/destroy/destroy_command.rb +3 -2
  39. data/lib/rails/commands/dev/dev_command.rb +1 -6
  40. data/lib/rails/commands/encrypted/USAGE +15 -20
  41. data/lib/rails/commands/encrypted/encrypted_command.rb +46 -35
  42. data/lib/rails/commands/gem_help/USAGE +16 -0
  43. data/lib/rails/commands/gem_help/gem_help_command.rb +13 -0
  44. data/lib/rails/commands/generate/generate_command.rb +3 -3
  45. data/lib/rails/commands/help/USAGE +15 -14
  46. data/lib/rails/commands/help/help_command.rb +21 -2
  47. data/lib/rails/commands/initializers/initializers_command.rb +1 -4
  48. data/lib/rails/commands/middleware/middleware_command.rb +17 -0
  49. data/lib/rails/commands/new/new_command.rb +2 -0
  50. data/lib/rails/commands/notes/notes_command.rb +5 -14
  51. data/lib/rails/commands/plugin/plugin_command.rb +2 -0
  52. data/lib/rails/commands/rake/rake_command.rb +27 -23
  53. data/lib/rails/commands/restart/restart_command.rb +14 -0
  54. data/lib/rails/commands/routes/routes_command.rb +13 -1
  55. data/lib/rails/commands/runner/USAGE +14 -12
  56. data/lib/rails/commands/runner/runner_command.rb +34 -21
  57. data/lib/rails/commands/secret/secret_command.rb +13 -0
  58. data/lib/rails/commands/secrets/USAGE +44 -43
  59. data/lib/rails/commands/secrets/secrets_command.rb +20 -38
  60. data/lib/rails/commands/server/server_command.rb +40 -64
  61. data/lib/rails/commands/test/USAGE +14 -0
  62. data/lib/rails/commands/test/test_command.rb +58 -16
  63. data/lib/rails/commands/unused_routes/unused_routes_command.rb +75 -0
  64. data/lib/rails/commands/version/version_command.rb +1 -0
  65. data/lib/rails/configuration.rb +53 -23
  66. data/lib/rails/console/app.rb +1 -4
  67. data/lib/rails/console/helpers.rb +2 -2
  68. data/lib/rails/deprecator.rb +7 -0
  69. data/lib/rails/engine/configuration.rb +54 -9
  70. data/lib/rails/engine/updater.rb +1 -1
  71. data/lib/rails/engine.rb +105 -81
  72. data/lib/rails/gem_version.rb +5 -5
  73. data/lib/rails/generators/actions/create_migration.rb +9 -5
  74. data/lib/rails/generators/actions.rb +275 -97
  75. data/lib/rails/generators/active_model.rb +28 -14
  76. data/lib/rails/generators/app_base.rb +487 -165
  77. data/lib/rails/generators/app_name.rb +3 -14
  78. data/lib/rails/generators/base.rb +42 -31
  79. data/lib/rails/generators/database.rb +41 -4
  80. data/lib/rails/generators/erb/mailer/mailer_generator.rb +0 -1
  81. data/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +1 -1
  82. data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +2 -1
  83. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +11 -11
  84. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +8 -4
  85. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +11 -28
  86. data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +7 -3
  87. data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +17 -0
  88. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -17
  89. data/lib/rails/generators/erb.rb +1 -2
  90. data/lib/rails/generators/generated_attribute.rb +60 -19
  91. data/lib/rails/generators/migration.rb +4 -8
  92. data/lib/rails/generators/model_helpers.rb +29 -4
  93. data/lib/rails/generators/named_base.rb +15 -15
  94. data/lib/rails/generators/rails/app/USAGE +23 -6
  95. data/lib/rails/generators/rails/app/app_generator.rb +151 -80
  96. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +103 -0
  97. data/lib/rails/generators/rails/app/templates/Gemfile.tt +44 -54
  98. data/lib/rails/generators/rails/app/templates/Rakefile.tt +1 -1
  99. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +2 -2
  100. data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb.tt +2 -2
  101. data/lib/rails/generators/rails/app/templates/app/models/application_record.rb.tt +1 -1
  102. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +4 -9
  103. data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +1 -1
  104. data/lib/rails/generators/rails/app/templates/bin/rails.tt +3 -3
  105. data/lib/rails/generators/rails/app/templates/bin/rake.tt +2 -2
  106. data/lib/rails/generators/rails/app/templates/bin/setup.tt +19 -15
  107. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +18 -23
  108. data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +3 -3
  109. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +5 -6
  110. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +12 -11
  111. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +17 -16
  112. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +5 -5
  113. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +12 -11
  114. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +12 -11
  115. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +17 -18
  116. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +4 -4
  117. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +14 -13
  118. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +59 -0
  119. data/lib/rails/generators/rails/app/templates/config/environment.rb.tt +1 -1
  120. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +32 -14
  121. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +42 -55
  122. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +27 -15
  123. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +3 -5
  124. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +21 -28
  125. data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +3 -3
  126. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +6 -2
  127. data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +4 -4
  128. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +284 -0
  129. data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +13 -0
  130. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +13 -15
  131. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +17 -20
  132. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +8 -1
  133. data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +5 -5
  134. data/lib/rails/generators/rails/app/templates/config.ru.tt +2 -1
  135. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +7 -5
  136. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +10 -0
  137. data/lib/rails/generators/rails/app/templates/dockerignore.tt +43 -0
  138. data/lib/rails/generators/rails/app/templates/gitattributes.tt +9 -0
  139. data/lib/rails/generators/rails/app/templates/gitignore.tt +12 -9
  140. data/lib/rails/generators/rails/app/templates/node-version.tt +1 -0
  141. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +10 -8
  142. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +13 -11
  143. data/lib/rails/generators/rails/application_record/application_record_generator.rb +4 -0
  144. data/lib/rails/generators/rails/benchmark/USAGE +19 -0
  145. data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +30 -0
  146. data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +15 -0
  147. data/lib/rails/generators/rails/controller/USAGE +13 -5
  148. data/lib/rails/generators/rails/controller/controller_generator.rb +7 -42
  149. data/lib/rails/generators/rails/controller/templates/controller.rb.tt +1 -5
  150. data/lib/rails/generators/rails/credentials/credentials_generator.rb +30 -25
  151. data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +8 -0
  152. data/lib/rails/generators/rails/db/system/change/change_generator.rb +31 -1
  153. data/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb +6 -2
  154. data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +1 -2
  155. data/lib/rails/generators/rails/generator/USAGE +2 -2
  156. data/lib/rails/generators/rails/generator/generator_generator.rb +0 -1
  157. data/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +1 -1
  158. data/lib/rails/generators/rails/generator/templates/USAGE.tt +1 -1
  159. data/lib/rails/generators/rails/helper/USAGE +2 -3
  160. data/lib/rails/generators/rails/integration_test/USAGE +2 -2
  161. data/lib/rails/generators/rails/migration/USAGE +22 -12
  162. data/lib/rails/generators/rails/model/model_generator.rb +4 -0
  163. data/lib/rails/generators/rails/plugin/USAGE +17 -6
  164. data/lib/rails/generators/rails/plugin/plugin_generator.rb +86 -46
  165. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +15 -20
  166. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +10 -39
  167. data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +1 -1
  168. data/lib/rails/generators/rails/plugin/templates/README.md.tt +1 -1
  169. data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +4 -18
  170. data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +0 -1
  171. data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +2 -2
  172. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +0 -3
  173. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +7 -22
  174. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +10 -14
  175. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +2 -2
  176. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb.tt +1 -1
  177. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb.tt +1 -0
  178. data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +3 -3
  179. data/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb.tt +4 -4
  180. data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb.tt +1 -1
  181. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +6 -14
  182. data/lib/rails/generators/rails/resource/USAGE +4 -4
  183. data/lib/rails/generators/rails/resource/resource_generator.rb +6 -0
  184. data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +2 -27
  185. data/lib/rails/generators/rails/scaffold/USAGE +5 -5
  186. data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -20
  187. data/lib/rails/generators/rails/scaffold_controller/USAGE +2 -2
  188. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +7 -2
  189. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -6
  190. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +7 -11
  191. data/lib/rails/generators/rails/system_test/USAGE +2 -2
  192. data/lib/rails/generators/rails/task/USAGE +3 -3
  193. data/lib/rails/generators/resource_helpers.rb +2 -2
  194. data/lib/rails/generators/test_case.rb +3 -3
  195. data/lib/rails/generators/test_unit/controller/controller_generator.rb +2 -0
  196. data/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt +3 -3
  197. data/lib/rails/generators/test_unit/generator/generator_generator.rb +0 -1
  198. data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +3 -3
  199. data/lib/rails/generators/test_unit/integration/integration_generator.rb +0 -1
  200. data/lib/rails/generators/test_unit/integration/templates/integration_test.rb.tt +1 -1
  201. data/lib/rails/generators/test_unit/job/templates/unit_test.rb.tt +1 -1
  202. data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +1 -1
  203. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +3 -3
  204. data/lib/rails/generators/test_unit/model/templates/unit_test.rb.tt +1 -1
  205. data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +1 -1
  206. data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +2 -2
  207. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +4 -5
  208. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +6 -6
  209. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +8 -8
  210. data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +9 -11
  211. data/lib/rails/generators/testing/assertions.rb +2 -2
  212. data/lib/rails/generators/testing/{behaviour.rb → behavior.rb} +8 -7
  213. data/lib/rails/generators.rb +43 -45
  214. data/lib/rails/health_controller.rb +55 -0
  215. data/lib/rails/info.rb +4 -4
  216. data/lib/rails/info_controller.rb +30 -13
  217. data/lib/rails/initializable.rb +1 -1
  218. data/lib/rails/mailers_controller.rb +18 -9
  219. data/lib/rails/paths.rb +28 -19
  220. data/lib/rails/rack/logger.rb +17 -17
  221. data/lib/rails/rackup/server.rb +15 -0
  222. data/lib/rails/railtie/configurable.rb +0 -1
  223. data/lib/rails/railtie/configuration.rb +15 -3
  224. data/lib/rails/railtie.rb +80 -37
  225. data/lib/rails/ruby_version_check.rb +5 -3
  226. data/lib/rails/secrets.rb +14 -9
  227. data/lib/rails/source_annotation_extractor.rb +69 -34
  228. data/lib/rails/tasks/engine.rake +8 -11
  229. data/lib/rails/tasks/framework.rake +4 -6
  230. data/lib/rails/tasks/log.rake +1 -1
  231. data/lib/rails/tasks/misc.rake +4 -15
  232. data/lib/rails/tasks/statistics.rake +9 -6
  233. data/lib/rails/tasks/tmp.rake +13 -6
  234. data/lib/rails/tasks/yarn.rake +17 -6
  235. data/lib/rails/tasks/zeitwerk.rake +16 -41
  236. data/lib/rails/tasks.rb +0 -6
  237. data/lib/rails/templates/layouts/application.html.erb +15 -0
  238. data/lib/rails/templates/rails/mailers/email.html.erb +46 -11
  239. data/lib/rails/templates/rails/mailers/index.html.erb +14 -7
  240. data/lib/rails/templates/rails/mailers/mailer.html.erb +11 -5
  241. data/lib/rails/templates/rails/welcome/index.html.erb +65 -48
  242. data/lib/rails/test_help.rb +13 -14
  243. data/lib/rails/test_unit/line_filtering.rb +1 -1
  244. data/lib/rails/test_unit/railtie.rb +0 -4
  245. data/lib/rails/test_unit/reporter.rb +8 -3
  246. data/lib/rails/test_unit/runner.rb +61 -19
  247. data/lib/rails/test_unit/test_parser.rb +88 -0
  248. data/lib/rails/test_unit/testing.rake +17 -36
  249. data/lib/rails/testing/maintain_test_schema.rb +16 -0
  250. data/lib/rails/version.rb +1 -1
  251. data/lib/rails/welcome_controller.rb +1 -0
  252. data/lib/rails/zeitwerk_checker.rb +15 -0
  253. data/lib/rails.rb +31 -23
  254. metadata +89 -58
  255. data/RDOC_MAIN.rdoc +0 -98
  256. data/lib/rails/application/dummy_erb_compiler.rb +0 -18
  257. data/lib/rails/command/spellchecker.rb +0 -58
  258. data/lib/rails/generators/css/assets/assets_generator.rb +0 -15
  259. data/lib/rails/generators/css/assets/templates/stylesheet.css +0 -4
  260. data/lib/rails/generators/css/scaffold/scaffold_generator.rb +0 -18
  261. data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +0 -6
  262. data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +0 -5
  263. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +0 -23
  264. data/lib/rails/generators/rails/app/templates/bin/yarn.tt +0 -10
  265. data/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +0 -50
  266. data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +0 -86
  267. data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb.tt +0 -8
  268. data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +0 -7
  269. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt +0 -5
  270. data/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt +0 -4
  271. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +0 -45
  272. data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +0 -16
  273. data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +0 -6
  274. data/lib/rails/generators/rails/app/templates/package.json.tt +0 -11
  275. data/lib/rails/generators/rails/assets/USAGE +0 -17
  276. data/lib/rails/generators/rails/assets/assets_generator.rb +0 -26
  277. data/lib/rails/generators/rails/assets/templates/stylesheet.css +0 -4
  278. data/lib/rails/generators/rails/model/USAGE +0 -114
  279. data/lib/rails/generators/rails/plugin/templates/rails/application.rb.tt +0 -23
  280. data/lib/rails/generators/rails/scaffold/templates/scaffold.css +0 -80
  281. data/lib/rails/tasks/annotations.rake +0 -22
  282. data/lib/rails/tasks/dev.rake +0 -11
  283. data/lib/rails/tasks/initializers.rake +0 -9
  284. data/lib/rails/tasks/middleware.rake +0 -9
  285. data/lib/rails/tasks/restart.rake +0 -9
  286. data/lib/rails/tasks/routes.rake +0 -9
@@ -2,11 +2,11 @@
2
2
  * This is a manifest file that'll be compiled into application.css, which will include all the files
3
3
  * listed below.
4
4
  *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
5
+ * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
6
  * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS
10
10
  * files in this directory. Styles in this file should be added after the last require_* statement.
11
11
  * It is generally better to create a new file per style scope.
12
12
  *
@@ -1,4 +1,4 @@
1
1
  class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
2
+ default from: "from@example.com"
3
+ layout "mailer"
4
4
  end
@@ -1,3 +1,3 @@
1
1
  class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
2
+ primary_abstract_class
3
3
  end
@@ -2,19 +2,14 @@
2
2
  <html>
3
3
  <head>
4
4
  <title><%= camelized %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
5
6
  <%%= csrf_meta_tags %>
6
7
  <%%= csp_meta_tag %>
7
8
 
8
- <%- if options[:skip_javascript] -%>
9
- <%%= stylesheet_link_tag 'application', media: 'all' %>
9
+ <%- if options[:skip_hotwire] || options[:skip_javascript] -%>
10
+ <%%= stylesheet_link_tag "application" %>
10
11
  <%- else -%>
11
- <%- unless options[:skip_turbolinks] -%>
12
- <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
13
- <%%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
14
- <%- else -%>
15
- <%%= stylesheet_link_tag 'application', media: 'all' %>
16
- <%%= javascript_pack_tag 'application' %>
17
- <%- end -%>
12
+ <%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
18
13
  <%- end -%>
19
14
  </head>
20
15
 
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
5
  <style>
6
6
  /* Email styles need to be inline */
7
7
  </style>
@@ -1,3 +1,3 @@
1
- APP_PATH = File.expand_path('../config/application', __dir__)
2
- require_relative '../config/boot'
3
- require 'rails/commands'
1
+ APP_PATH = File.expand_path("../config/application", __dir__)
2
+ require_relative "../config/boot"
3
+ require "rails/commands"
@@ -1,3 +1,3 @@
1
- require_relative '../config/boot'
2
- require 'rake'
1
+ require_relative "../config/boot"
2
+ require "rake"
3
3
  Rake.application.run
@@ -1,39 +1,43 @@
1
- require 'fileutils'
1
+ require "fileutils"
2
2
 
3
3
  # path to your application root.
4
- APP_ROOT = File.expand_path('..', __dir__)
4
+ APP_ROOT = File.expand_path("..", __dir__)
5
5
 
6
6
  def system!(*args)
7
- system(*args) || abort("\n== Command #{args} failed ==")
7
+ system(*args, exception: true)
8
8
  end
9
9
 
10
10
  FileUtils.chdir APP_ROOT do
11
- # This script is a way to setup or update your development environment automatically.
12
- # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
11
+ # This script is a way to set up or update your development environment automatically.
12
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
13
13
  # Add necessary setup steps to this file.
14
14
 
15
- puts '== Installing dependencies =='
16
- system! 'gem install bundler --conservative'
17
- system('bundle check') || system!('bundle install')
18
- <% unless options.skip_javascript? -%>
15
+ puts "== Installing dependencies =="
16
+ system! "gem install bundler --conservative"
17
+ system("bundle check") || system!("bundle install")
18
+ <% if using_node? -%>
19
19
 
20
20
  # Install JavaScript dependencies
21
- # system('bin/yarn')
21
+ system("yarn check --check-files") || system!("yarn install")
22
+ <% elsif using_bun? -%>
23
+
24
+ # Install JavaScript dependencies
25
+ system!("bun install")
22
26
  <% end -%>
23
27
  <% unless options.skip_active_record? -%>
24
28
 
25
29
  # puts "\n== Copying sample files =="
26
- # unless File.exist?('config/database.yml')
27
- # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
30
+ # unless File.exist?("config/database.yml")
31
+ # FileUtils.cp "config/database.yml.sample", "config/database.yml"
28
32
  # end
29
33
 
30
34
  puts "\n== Preparing database =="
31
- system! 'bin/rails db:prepare'
35
+ system! "bin/rails db:prepare"
32
36
  <% end -%>
33
37
 
34
38
  puts "\n== Removing old logs and tempfiles =="
35
- system! 'bin/rails log:clear tmp:clear'
39
+ system! "bin/rails log:clear tmp:clear"
36
40
 
37
41
  puts "\n== Restarting application server =="
38
- system! 'bin/rails restart'
42
+ system! "bin/rails restart"
39
43
  end
@@ -1,23 +1,6 @@
1
- require_relative 'boot'
1
+ require_relative "boot"
2
2
 
3
- <% if include_all_railties? -%>
4
- require 'rails/all'
5
- <% else -%>
6
- require "rails"
7
- # Pick the frameworks you want:
8
- require "active_model/railtie"
9
- require "active_job/railtie"
10
- <%= comment_if :skip_active_record %>require "active_record/railtie"
11
- <%= comment_if :skip_active_storage %>require "active_storage/engine"
12
- require "action_controller/railtie"
13
- <%= comment_if :skip_action_mailer %>require "action_mailer/railtie"
14
- <%= comment_if :skip_action_mailbox %>require "action_mailbox/engine"
15
- <%= comment_if :skip_action_text %>require "action_text/engine"
16
- require "action_view/railtie"
17
- <%= comment_if :skip_action_cable %>require "action_cable/engine"
18
- <%= comment_if :skip_sprockets %>require "sprockets/railtie"
19
- <%= comment_if :skip_test %>require "rails/test_unit/railtie"
20
- <% end -%>
3
+ <%= rails_require_statement %>
21
4
 
22
5
  # Require the gems listed in Gemfile, including any gems
23
6
  # you've limited to :test, :development, or :production.
@@ -25,13 +8,25 @@ Bundler.require(*Rails.groups)
25
8
 
26
9
  module <%= app_const_base %>
27
10
  class Application < Rails::Application
11
+ <%- if !options.dummy_app? -%>
28
12
  # Initialize configuration defaults for originally generated Rails version.
29
13
  config.load_defaults <%= build(:config_target_version) %>
14
+ <%- else -%>
15
+ config.load_defaults Rails::VERSION::STRING.to_f
16
+ <%- end -%>
17
+
18
+ # Please, add to the `ignore` list any other `lib` subdirectories that do
19
+ # not contain `.rb` files, or that should not be reloaded or eager loaded.
20
+ # Common ones are `templates`, `generators`, or `middleware`, for example.
21
+ config.autoload_lib(ignore: %w(assets tasks))
30
22
 
31
- # Settings in config/environments/* take precedence over those specified here.
32
- # Application configuration can go into files in config/initializers
33
- # -- all .rb files in that directory are automatically loaded after loading
34
- # the framework and any gems in your application.
23
+ # Configuration for the application, engines, and railties goes here.
24
+ #
25
+ # These settings can be overridden in specific environments using the files
26
+ # in config/environments, which are processed later.
27
+ #
28
+ # config.time_zone = "Central Time (US & Canada)"
29
+ # config.eager_load_paths << Rails.root.join("extras")
35
30
  <%- if options.api? -%>
36
31
 
37
32
  # Only loads a smaller set of middleware suitable for API only apps.
@@ -1,6 +1,6 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
1
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2
2
 
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
3
+ require "bundler/setup" # Set up gems listed in the Gemfile.
4
4
  <% if depend_on_bootsnap? -%>
5
- require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
5
+ require "bootsnap/setup" # Speed up boot time by caching expensive operations.
6
6
  <%- end -%>
@@ -3,7 +3,7 @@
3
3
  # gem install activerecord-jdbcmssql-adapter
4
4
  #
5
5
  # Configure using Gemfile:
6
- # gem 'activerecord-jdbcmssql-adapter'
6
+ # gem "activerecord-jdbcmssql-adapter"
7
7
  #
8
8
  # development:
9
9
  # adapter: mssql
@@ -58,12 +58,11 @@ test:
58
58
  # like your database password, in your source code. If your source code is
59
59
  # ever seen by anyone, they now have access to your database.
60
60
  #
61
- # Instead, provide the password as a unix environment variable when you boot
62
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
63
- # for a full rundown on how to provide these environment variables in a
64
- # production deployment.
61
+ # Instead, provide the password as an environment variable when you boot the
62
+ # app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
63
+ # for a full overview on how database connection configuration can be specified.
65
64
  #
66
65
  production:
67
66
  url: jdbc:db://localhost/<%= app_name %>_production
68
67
  username: <%= app_name %>
69
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
68
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -4,7 +4,7 @@
4
4
  # gem install activerecord-jdbcmysql-adapter
5
5
  #
6
6
  # Configure Using Gemfile
7
- # gem 'activerecord-jdbcmysql-adapter'
7
+ # gem "activerecord-jdbcmysql-adapter"
8
8
  #
9
9
  # And be sure to use new-style password hashing:
10
10
  # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
@@ -31,23 +31,24 @@ test:
31
31
  # like your database password, in your source code. If your source code is
32
32
  # ever seen by anyone, they now have access to your database.
33
33
  #
34
- # Instead, provide the password as a unix environment variable when you boot
35
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
36
- # for a full rundown on how to provide these environment variables in a
37
- # production deployment.
38
- #
39
- # On Heroku and other platform providers, you may have a full connection URL
40
- # available as an environment variable. For example:
34
+ # Instead, provide the password or a full connection URL as an environment
35
+ # variable when you boot the app. For example:
41
36
  #
42
37
  # DATABASE_URL="mysql://myuser:mypass@localhost/somedatabase"
43
38
  #
44
- # You can use this database configuration with:
39
+ # If the connection URL is provided in the special DATABASE_URL environment
40
+ # variable, Rails will automatically merge its configuration values on top of
41
+ # the values provided in this file. Alternatively, you can specify a connection
42
+ # URL environment variable explicitly:
45
43
  #
46
44
  # production:
47
- # url: <%%= ENV['DATABASE_URL'] %>
45
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
46
+ #
47
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
48
+ # for a full overview on how database connection configuration can be specified.
48
49
  #
49
50
  production:
50
51
  <<: *default
51
52
  database: <%= app_name %>_production
52
53
  username: <%= app_name %>
53
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
54
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,7 +1,7 @@
1
1
  # PostgreSQL. Versions 9.3 and up are supported.
2
2
  #
3
3
  # Configure Using Gemfile
4
- # gem 'activerecord-jdbcpostgresql-adapter'
4
+ # gem "activerecord-jdbcpostgresql-adapter"
5
5
  #
6
6
  default: &default
7
7
  adapter: postgresql
@@ -12,13 +12,13 @@ development:
12
12
  <<: *default
13
13
  database: <%= app_name %>_development
14
14
 
15
- # The specified database role being used to connect to postgres.
16
- # To create additional roles in postgres see `$ createuser --help`.
17
- # When left blank, postgres will use the default role. This is
18
- # the same name as the operating system user that initialized the database.
15
+ # The specified database role being used to connect to PostgreSQL.
16
+ # To create additional roles in PostgreSQL see `$ createuser --help`.
17
+ # When left blank, PostgreSQL will use the default role. This is
18
+ # the same name as the operating system user running Rails.
19
19
  #username: <%= app_name %>
20
20
 
21
- # The password associated with the postgres role (username).
21
+ # The password associated with the PostgreSQL role (username).
22
22
  #password:
23
23
 
24
24
  # Connect on a TCP socket. Omitted by default since the client uses a
@@ -47,23 +47,24 @@ test:
47
47
  # like your database password, in your source code. If your source code is
48
48
  # ever seen by anyone, they now have access to your database.
49
49
  #
50
- # Instead, provide the password as a unix environment variable when you boot
51
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
52
- # for a full rundown on how to provide these environment variables in a
53
- # production deployment.
54
- #
55
- # On Heroku and other platform providers, you may have a full connection URL
56
- # available as an environment variable. For example:
50
+ # Instead, provide the password or a full connection URL as an environment
51
+ # variable when you boot the app. For example:
57
52
  #
58
53
  # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
59
54
  #
60
- # You can use this database configuration with:
55
+ # If the connection URL is provided in the special DATABASE_URL environment
56
+ # variable, Rails will automatically merge its configuration values on top of
57
+ # the values provided in this file. Alternatively, you can specify a connection
58
+ # URL environment variable explicitly:
61
59
  #
62
60
  # production:
63
- # url: <%%= ENV['DATABASE_URL'] %>
61
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
62
+ #
63
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
64
+ # for a full overview on how database connection configuration can be specified.
64
65
  #
65
66
  production:
66
67
  <<: *default
67
68
  database: <%= app_name %>_production
68
69
  username: <%= app_name %>
69
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
70
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,8 +1,8 @@
1
1
  # SQLite. Versions 3.8.0 and up are supported.
2
- # gem 'activerecord-jdbcsqlite3-adapter'
2
+ # gem "activerecord-jdbcsqlite3-adapter"
3
3
  #
4
4
  # Configure Using Gemfile
5
- # gem 'activerecord-jdbcsqlite3-adapter'
5
+ # gem "activerecord-jdbcsqlite3-adapter"
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
@@ -10,15 +10,15 @@ default: &default
10
10
 
11
11
  development:
12
12
  <<: *default
13
- database: db/development.sqlite3
13
+ database: storage/development.sqlite3
14
14
 
15
15
  # Warning: The database defined as "test" will be erased and
16
16
  # re-generated from your development database when you run "rake".
17
17
  # Do not set this db to the same as development or production.
18
18
  test:
19
19
  <<: *default
20
- database: db/test.sqlite3
20
+ database: storage/test.sqlite3
21
21
 
22
22
  production:
23
23
  <<: *default
24
- database: db/production.sqlite3
24
+ database: storage/production.sqlite3
@@ -4,7 +4,7 @@
4
4
  # gem install mysql2
5
5
  #
6
6
  # Ensure the MySQL gem is defined in your Gemfile
7
- # gem 'mysql2'
7
+ # gem "mysql2"
8
8
  #
9
9
  # And be sure to use new-style password hashing:
10
10
  # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
@@ -36,23 +36,24 @@ test:
36
36
  # like your database password, in your source code. If your source code is
37
37
  # ever seen by anyone, they now have access to your database.
38
38
  #
39
- # Instead, provide the password as a unix environment variable when you boot
40
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
41
- # for a full rundown on how to provide these environment variables in a
42
- # production deployment.
43
- #
44
- # On Heroku and other platform providers, you may have a full connection URL
45
- # available as an environment variable. For example:
39
+ # Instead, provide the password or a full connection URL as an environment
40
+ # variable when you boot the app. For example:
46
41
  #
47
42
  # DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
48
43
  #
49
- # You can use this database configuration with:
44
+ # If the connection URL is provided in the special DATABASE_URL environment
45
+ # variable, Rails will automatically merge its configuration values on top of
46
+ # the values provided in this file. Alternatively, you can specify a connection
47
+ # URL environment variable explicitly:
50
48
  #
51
49
  # production:
52
- # url: <%%= ENV['DATABASE_URL'] %>
50
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
51
+ #
52
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
53
+ # for a full overview on how database connection configuration can be specified.
53
54
  #
54
55
  production:
55
56
  <<: *default
56
57
  database: <%= app_name %>_production
57
58
  username: <%= app_name %>
58
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
59
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -37,25 +37,26 @@ test:
37
37
  # like your database password, in your source code. If your source code is
38
38
  # ever seen by anyone, they now have access to your database.
39
39
  #
40
- # Instead, provide the password as a unix environment variable when you boot
41
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
42
- # for a full rundown on how to provide these environment variables in a
43
- # production deployment.
44
- #
45
- # On Heroku and other platform providers, you may have a full connection URL
46
- # available as an environment variable. For example:
40
+ # Instead, provide the password or a full connection URL as an environment
41
+ # variable when you boot the app. For example:
47
42
  #
48
43
  # DATABASE_URL="oracle-enhanced://myuser:mypass@localhost/somedatabase"
49
44
  #
50
- # Note that the adapter name uses a dash instead of an underscore.
45
+ # (Note that the adapter name uses a dash instead of an underscore.)
51
46
  #
52
- # You can use this database configuration with:
47
+ # If the connection URL is provided in the special DATABASE_URL environment
48
+ # variable, Rails will automatically merge its configuration values on top of
49
+ # the values provided in this file. Alternatively, you can specify a connection
50
+ # URL environment variable explicitly:
53
51
  #
54
52
  # production:
55
- # url: <%%= ENV['DATABASE_URL'] %>
53
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
54
+ #
55
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
56
+ # for a full overview on how database connection configuration can be specified.
56
57
  #
57
58
  production:
58
59
  <<: *default
59
60
  database: <%= app_name %>_production
60
61
  username: <%= app_name %>
61
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
62
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -4,15 +4,13 @@
4
4
  # gem install pg
5
5
  # On macOS with Homebrew:
6
6
  # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7
- # On macOS with MacPorts:
8
- # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9
7
  # On Windows:
10
8
  # gem install pg
11
9
  # Choose the win32 build.
12
10
  # Install PostgreSQL and put its /bin directory on your path.
13
11
  #
14
12
  # Configure Using Gemfile
15
- # gem 'pg'
13
+ # gem "pg"
16
14
  #
17
15
  default: &default
18
16
  adapter: postgresql
@@ -25,13 +23,13 @@ development:
25
23
  <<: *default
26
24
  database: <%= app_name %>_development
27
25
 
28
- # The specified database role being used to connect to postgres.
29
- # To create additional roles in postgres see `$ createuser --help`.
30
- # When left blank, postgres will use the default role. This is
31
- # the same name as the operating system user that initialized the database.
26
+ # The specified database role being used to connect to PostgreSQL.
27
+ # To create additional roles in PostgreSQL see `$ createuser --help`.
28
+ # When left blank, PostgreSQL will use the default role. This is
29
+ # the same name as the operating system user running Rails.
32
30
  #username: <%= app_name %>
33
31
 
34
- # The password associated with the postgres role (username).
32
+ # The password associated with the PostgreSQL role (username).
35
33
  #password:
36
34
 
37
35
  # Connect on a TCP socket. Omitted by default since the client uses a
@@ -63,23 +61,24 @@ test:
63
61
  # like your database password, in your source code. If your source code is
64
62
  # ever seen by anyone, they now have access to your database.
65
63
  #
66
- # Instead, provide the password as a unix environment variable when you boot
67
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
68
- # for a full rundown on how to provide these environment variables in a
69
- # production deployment.
70
- #
71
- # On Heroku and other platform providers, you may have a full connection URL
72
- # available as an environment variable. For example:
64
+ # Instead, provide the password or a full connection URL as an environment
65
+ # variable when you boot the app. For example:
73
66
  #
74
67
  # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
75
68
  #
76
- # You can use this database configuration with:
69
+ # If the connection URL is provided in the special DATABASE_URL environment
70
+ # variable, Rails will automatically merge its configuration values on top of
71
+ # the values provided in this file. Alternatively, you can specify a connection
72
+ # URL environment variable explicitly:
77
73
  #
78
74
  # production:
79
- # url: <%%= ENV['DATABASE_URL'] %>
75
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
76
+ #
77
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
78
+ # for a full overview on how database connection configuration can be specified.
80
79
  #
81
80
  production:
82
81
  <<: *default
83
82
  database: <%= app_name %>_production
84
83
  username: <%= app_name %>
85
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
84
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -2,7 +2,7 @@
2
2
  # gem install sqlite3
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
5
+ # gem "sqlite3"
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
@@ -11,15 +11,15 @@ default: &default
11
11
 
12
12
  development:
13
13
  <<: *default
14
- database: db/development.sqlite3
14
+ database: storage/development.sqlite3
15
15
 
16
16
  # Warning: The database defined as "test" will be erased and
17
17
  # re-generated from your development database when you run "rake".
18
18
  # Do not set this db to the same as development or production.
19
19
  test:
20
20
  <<: *default
21
- database: db/test.sqlite3
21
+ database: storage/test.sqlite3
22
22
 
23
23
  production:
24
24
  <<: *default
25
- database: db/production.sqlite3
25
+ database: storage/production.sqlite3
@@ -5,14 +5,14 @@
5
5
  # gem install activerecord-sqlserver-adapter
6
6
  #
7
7
  # Ensure the activerecord adapter and db driver gems are defined in your Gemfile
8
- # gem 'tiny_tds'
9
- # gem 'activerecord-sqlserver-adapter'
8
+ # gem "tiny_tds"
9
+ # gem "activerecord-sqlserver-adapter"
10
10
  #
11
11
  default: &default
12
12
  adapter: sqlserver
13
13
  encoding: utf8
14
14
  username: sa
15
- password: <%%= ENV['SA_PASSWORD'] %>
15
+ password: <%%= ENV["SA_PASSWORD"] %>
16
16
  host: localhost
17
17
 
18
18
  development:
@@ -30,23 +30,24 @@ test:
30
30
  # like your database password, in your source code. If your source code is
31
31
  # ever seen by anyone, they now have access to your database.
32
32
  #
33
- # Instead, provide the password as a unix environment variable when you boot
34
- # the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
35
- # for a full rundown on how to provide these environment variables in a
36
- # production deployment.
37
- #
38
- # On Heroku and other platform providers, you may have a full connection URL
39
- # available as an environment variable. For example:
33
+ # Instead, provide the password or a full connection URL as an environment
34
+ # variable when you boot the app. For example:
40
35
  #
41
36
  # DATABASE_URL="sqlserver://myuser:mypass@localhost/somedatabase"
42
37
  #
43
- # You can use this database configuration with:
38
+ # If the connection URL is provided in the special DATABASE_URL environment
39
+ # variable, Rails will automatically merge its configuration values on top of
40
+ # the values provided in this file. Alternatively, you can specify a connection
41
+ # URL environment variable explicitly:
44
42
  #
45
43
  # production:
46
- # url: <%%= ENV['DATABASE_URL'] %>
44
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
45
+ #
46
+ # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
47
+ # for a full overview on how database connection configuration can be specified.
47
48
  #
48
49
  production:
49
50
  <<: *default
50
51
  database: <%= app_name %>_production
51
52
  username: <%= app_name %>
52
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
53
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>