Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
47560d49
Commit
47560d49
authored
Apr 09, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
b41f36c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
16 deletions
+33
-16
app/views/entries/_onlineuser.html.erb
app/views/entries/_onlineuser.html.erb
+1
-3
config/initializers/session_store.rb
config/initializers/session_store.rb
+2
-2
db/migrate/20120409100915_add_sessions_table.rb
db/migrate/20120409100915_add_sessions_table.rb
+12
-0
db/schema.rb
db/schema.rb
+18
-11
No files found.
app/views/entries/_onlineuser.html.erb
View file @
47560d49
<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
config/initializers/session_store.rb
View file @
47560d49
# 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
db/migrate/20120409100915_add_sessions_table.rb
0 → 100644
View file @
47560d49
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
db/schema.rb
View file @
47560d49
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
2012040
2031416
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
2012040
9100915
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment