-
Notifications
You must be signed in to change notification settings - Fork 1
Today I learnt...
Share your new knowledge about Ruby, Rails or other good to know things for development with the crowd
How to Completely reload the db schema:
(bundle exec) rails db:migrate VERSION=0 (RAILS_ENV=test/development) && rails db:migrate (RAILS_ENV=test/development)
When you encounter translations missing:
Go to config >> locales. The start of the error message will reveal which file you'll have to edit. Add a nested path to the one you get complaints about, e.g.:
translation missing: en.users.registrations.edit.update
will require you to add / edit in users.en.yml
en:
users:
registrations:
edit:
update: "Update"
The certain t('sth') you can find in views are part of I18n and look up a translated text with the corresponding name in config >> locales
When the db migration fails in ruby with something mentioned like "method does not exist for nil class" rails db:reset
helps by migrating everything from the start.
You can get access to heroku postgres like this:
heroku run "ruby ./bin/rails dbconsole" -a hpi-lectureportal-dev