application_controller.rbとhelperの使い分け
application_controller.rbとhelperの使い分け
[app/controllers/application_controller.rb]に記載するもの
・controllerで使うものを記載する。
[app/helpers ファイル]に記載するもの
・基本的にビューで使うものを記載する。(controllerで使う場合は、includeして使う。)
application_controller.rbとhelperの使い分け
[app/controllers/application_controller.rb]に記載するもの
・controllerで使うものを記載する。
[app/helpers ファイル]に記載するもの
・基本的にビューで使うものを記載する。(controllerで使う場合は、includeして使う。)