セッションストアにActiveRecordを使用するには、environment.rbで以下の箇所のコメントを外す。 config.action_controller.session_store = :active_record_store セッション格納用のテーブルは、 rake db:sessions:create rake db:migrate で作成。 セッションストアにActiveRecordを使用するようにしたら、以下のエラーが発生。 No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store). application.rbで以下の箇所の:secretのコメ
![ActiveRecordにセッションを格納するようにしたらエラー - Pistolfly](https://cdn-ak-scissors.b.st-hatena.com/image/square/cbf9f41c980033fa06efe6a0a3f8ebe12030f134/height=288;version=1;width=512/https%3A%2F%2Fwww.pistolfly.com%2Fweblog%2Fimages%2Ficon.png)