パRails🚂
rails s
できない可能性が高いです。
@moegi29
@sadanora
5-2-6 233p 「Active Storageの問題点」から
5-3-1 236p まで。
PR:
5-3-1 237p から。🚂
@sharoa
@hiromisugie
generate
のmailer
サブコマンドを使って生成できる。@moegi29
@ayu-0505
@sadanora
@motohiro-mm
rails generate mailer ~
でファイルが作られるnpm install
はyarn add
にした方が良い!5-3-1 237p から
5-3-3 「Action Mailerの設定」まで。
PR: https://github.com/motohiro-mm/Perfect_Ruby_on_Rails_Ch5/pull/6
5-3-4 「Action Mailerのテスト」から。🚂
@sharoa
@shodan
UserMailer.with(送り先).メールのメソッド
に繋げる形で、同期的/非同期的にメールを送るかどうかを選択できる。config/
内の設定ファイルのconfig.action_mailer.delivery_method
で設定する。@moegi29
@sadanora
deliver_later
Active Job
のキューはRalisの再起動で破棄される。deliver_later
もActive Job
を利用しているので、ジョブの永続化をしておくなどの工夫をしないと、Railsの再起動のタイミングでキューが消えてしまう。@hiromisugie
deliver_now
メソッドと非同期で行うdeliver_later
メソッドがある。deliver_later
はdeliver_later(wait: 5.minutes)
のように引数で5分後とか設定できる。deliver_now
の方が今すぐやってくれそうだけど、厳密には「ユーザーへのメール送信が終わったら次のタスク(画面上に「登録しました」と表示するなど」)が実行され、deliver_later
はメール送信と次のタスクを並行でやってくれるから、後者のがユーザー体験的には良さそう?or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing