Rails 5.1から、viewをレンダリングしたくない時に使うrender nothing: trueが使えなくなった模様。
|
1 2 3 |
def action render nothing: true end |
→エラー。状況によってエラー内容は違うと思うが、筆者はActionView::MissingTemplateと言われた。
以下で正常に動く。
|
1 2 3 |
def action render body: nil end |
head :okとするやり方もあるらしい。