Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bad75da

Browse files
author
carsonkk
committed
adjust rental post times for prod
1 parent 49ce5e3 commit bad75da

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ heroku keys:add
120120
```sh
121121
heroku create
122122
git push heroku master
123-
# If you are pushing a branch other than local master to heroku master, use:
124-
# git push heroku other-local-branch:master
123+
# If you are pushing a branch other than master to heroku master, use:
124+
# git push heroku other-branch:master
125125
```
126126

127127
5. Migrate/seed the database and precompile assets
@@ -143,9 +143,12 @@ heroku open
143143

144144
6. In case you need to wipe out the existing database (if say you want to re-seed it differently):
145145
```sh
146+
# Locally
146147
heroku pg:reset DATABASE_URL
147-
heroku run rails db:migrate
148-
heroku run rails db:seed
148+
149+
# Remotely on Heroku, give it a minute to finish the previous command
150+
rails db:migrate
151+
rails db:seed
149152
```
150153

151154
## Deploying to AWS Elastic Beanstalk

app/views/users/settings.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@
8787
<hr>
8888
<p class="list-group-item">
8989
<%= icon('birthday-cake', class: 'fa-fw') %><%#
90-
%>Created On:<%#
90+
%>Created:<%#
9191
%><span><%= smart_datetime(@user.created_at) %></span>
9292
</p>
9393
<p class="list-group-item">
9494
<%= icon('refresh', class: 'fa-fw') %><%#
95-
%>Last Updated On:<%#
95+
%>Last Updated:<%#
9696
%><span><%= smart_datetime(@user.updated_at) %></span>
9797
</p>
9898
<p class="list-group-item">
9999
<%= icon('sign-in', class: 'fa-fw') %><%#
100-
%>Last Signed In On:<%#
100+
%>Last Signed In:<%#
101101
%><span><%= smart_datetime(@user.signed_in_at) %></span>
102102
</p>
103103
</div>

db/seeds.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,10 @@ def dict_to_db_str(d,cols,delim)
481481

482482
if direct_sql_inject
483483
d[:renter_id] = d[:renter_id].nil? ? "NULL_SHITTY_HACK" : d[:renter_id]
484-
d[:created_at] = NOW_STR
485-
d[:updated_at] = NOW_STR
486-
d[:start_time] = NOW_STR
487-
d[:end_time] = NOW_STR
484+
d[:created_at] = (tstart - 1.week).strftime("%FT%T")
485+
d[:updated_at] = (tstart - 1.week).strftime("%FT%T")
486+
d[:start_time] = tstart.strftime("%FT%T")
487+
d[:end_time] = tend.strftime("%FT%T")
488488
d[:renter_visible] = d[:renter_visible] ? "TRUE" : "FALSE"
489489
d[:skip_in_seed] = d[:skip_in_seed] ? "TRUE" : "FALSE"
490490
vals = dict_to_db_str(d,cols,val_delim)

0 commit comments

Comments
 (0)