Commit 47560d49 authored by 神楽坂玲奈's avatar 神楽坂玲奈

临时提交

parent b41f36c7
<div id="onlineuser">
<strong><%=t 'stat.onlineuser' %></strong>
- <%=t 'stat.total' %> <em>0</em>
- <%=t 'stat.max' %> <em>0</em> <%=t 'stat.at' %> <em><%=l Time.now, :format => :long %> </em>.
<%=t 'stat.onlineuser' %>: <%= Session.count(:conditions => ["updated_at > ?", 30.minutes.ago]) %>
</div>
\ No newline at end of file
# Be sure to restart your server when you modify this file.
MycardServerHttp::Application.config.session_store :cookie_store, key: '_mycard-server-http_session'
# MycardServerHttp::Application.config.session_store :cookie_store, key: '_mycard-server-http_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# MycardServerHttp::Application.config.session_store :active_record_store
MycardServerHttp::Application.config.session_store :active_record_store
class AddSessionsTable < ActiveRecord::Migration
def change
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120402031416) do
ActiveRecord::Schema.define(:version => 20120409100915) do
create_table "boards", :force => true do |t|
t.string "name", :default => "", :null => false
......@@ -60,15 +60,12 @@ ActiveRecord::Schema.define(:version => 20120402031416) do
t.integer "user1_id"
t.integer "user2_id"
t.integer "winner_id"
t.integer "winreason", :default => 0, :null => false
t.string "replay", :default => "", :null => false
t.integer "user1_credits", :default => 0, :null => false
t.integer "user2_credits", :default => 0, :null => false
t.integer "version"
t.boolean "user1_public", :default => true, :null => false
t.boolean "user2_public", :default => true, :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "winreason"
t.string "replay"
t.integer "user1_credits"
t.integer "user2_credits"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "duels", ["user1_id"], :name => "index_duels_on_user1_id"
......@@ -156,6 +153,16 @@ ActiveRecord::Schema.define(:version => 20120402031416) do
t.boolean "topic_lock", :default => false, :null => false
end
create_table "sessions", :force => true do |t|
t.string "session_id", :null => false
t.text "data"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
create_table "settings", :primary_key => "name", :force => true do |t|
t.text "value"
end
......@@ -182,7 +189,7 @@ ActiveRecord::Schema.define(:version => 20120402031416) do
create_table "users", :force => true do |t|
t.string "name", :null => false
t.string "password"
t.string "email", :default => "", :null => false
t.string "email"
t.string "nickname", :default => "", :null => false
t.text "signature"
t.integer "credits", :default => 0, :null => false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment