简体   繁体   English

Rails 3中的“ Class Session <ActiveRecord :: Base”在哪里

[英]Where is “class Session < ActiveRecord::Base” in rails 3

There are sessions table in rails 3 database and also a session controller. Rails 3数据库中有会话表,还有一个会话控制器。 However there is no session model. 但是,没有会话模型。 Do we need to manually create Session class (session.rb. NOT by rails generate model Session ) if we want to implement our own session time control? 如果要实现自己的会话时间控制,是否需要手动创建Session类(session.rb。不是通过rails generate model Session )? Here is a post about setup session time in session class. 是有关会话类中的设置会话时间的帖子。 Thanks so much. 非常感谢。

Your database tables really doesn't need to have models. 您的数据库表实际上不需要模型。 You can have tables in your database that are doing may be some auxilliary task and you can skip the models. 您可以在数据库中有正在执行的表,这可能是一些辅助任务,并且可以跳过模型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM