Skip to content

Commit c329ac4

Browse files
committed
Added debug to display env
1 parent bc69cd1 commit c329ac4

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

app/views/welcome/index.html.haml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
%li= link_to 'Cancel',root_path, {class: 'btn-flat btn-cancel waves-effect waves-light modal-close'}
2222
%li= link_to 'Agree', {action: "delete", controller: "article", id: article.id}, {class: 'btn-flat btn-danger waves-effect waves-light txtcolor-white'}
2323

24+
= Rails.env
25+
= debug ENV.to_h.to_yaml
26+
2427
<!-- Note: Plugins like modal will be included in the child templates not the main template. -->
2528
<!-- TurboLinks replaces the body only so when you load a new page, the javascript doesn't get run again. -->
2629
:javascript

config/database.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ default: &default
1919

2020
development:
2121
<<: *default
22-
database: rorblog_development
22+
# url: 'postgresql://neondb_owner:abc_DEF9caw8WXYZ@ep-fancy-dream-ab5abcdefg-pooler.c-2.us-east-2.aws.neon.tech/neondb?sslmode=require&channel_binding=require'
23+
# database: rorblog_development
24+
url: <%= ENV['DATABASE_URL'] %>
2325

2426
# development:
2527
# adapter: mysql2

docs/notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
##### Displaying ENV from the View Layer
2+
# ERB
3+
<%= debug ENV.to_h.to_yaml %>
4+
5+
# HAML
6+
= debug ENV.to_h.to_yaml

0 commit comments

Comments
 (0)