Skip to content

Instantly share code, notes, and snippets.

@vuongpd95
vuongpd95 / wordpress-as-sub-rails-app.md
Last active June 2, 2022 21:22
Setup wordpress as subdirectory (/blog) of an existing app
@vuongpd95
vuongpd95 / rails-heroku-cheatsheet.txt
Last active September 28, 2020 01:22
Useful terminal commands while working with rails & heroku
# n for line number, r for recursive, -i for case insensitive, -R for regular expression
grep -n -r -i -R --exclude-dir=node_modules '--include=*.'{slim,erb,js} "PATTERN" .
LOCAL:
# create a rake task
rails g task <task-name> # change lib/task/<task-name>.rake to desc the task
# to create database base on database.yml
rails db:create # OR rake db:create