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
d41a9831
Commit
d41a9831
authored
May 24, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台
parent
7603cd79
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
4 deletions
+23
-4
app/models/user.rb
app/models/user.rb
+1
-1
config/application.rb
config/application.rb
+1
-1
config/environments/development.rb
config/environments/development.rb
+1
-1
config/initializers/rails_admin.rb
config/initializers/rails_admin.rb
+20
-1
public/images/boards/ygocore-banner.png
public/images/boards/ygocore-banner.png
+0
-0
No files found.
app/models/user.rb
View file @
d41a9831
...
...
@@ -6,7 +6,7 @@ class User < ActiveRecord::Base
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
# Setup accessible (or protected) attributes for your model
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
,
:name
,
:nickname
,
:role_id
,
:regip
,
:lastloginip
,
:viewnum
,
:onlinetime
,
:credit1
,
:credit2
,
:credit3
,
:credit4
,
:credit5
,
:credit6
,
:credit7
,
:credit8
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
has_attached_file
:avatar
,
:styles
=>
{
:middle
=>
[
"120x120#"
,
:png
],
:small
=>
[
"48x48#"
,
:png
]
},
:default_url
=>
lambda
{
|
avatar
|
"http://www.gravatar.com/avatar/
#{
Digest
::
MD5
.
hexdigest
(
avatar
.
instance
.
email
.
strip
.
downcase
)
}
?size=
#{
120
}
"
}
...
...
config/application.rb
View file @
d41a9831
...
...
@@ -48,7 +48,7 @@ module MycardServerHttp
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
config
.
active_record
.
whitelist_attributes
=
tru
e
config
.
active_record
.
whitelist_attributes
=
fals
e
# Enable the asset pipeline
config
.
assets
.
enabled
=
true
...
...
config/environments/development.rb
View file @
d41a9831
...
...
@@ -23,7 +23,7 @@ MycardServerHttp::Application.configure do
config
.
action_dispatch
.
best_standards_support
=
:builtin
# Raise exception on mass assignment protection for Active Record models
config
.
active_record
.
mass_assignment_sanitizer
=
:strict
#
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
...
...
config/initializers/rails_admin.rb
View file @
d41a9831
#encoding: UTF-8
RailsAdmin
.
config
do
|
config
|
config
.
main_app_name
=
Proc
.
new
{
|
controller
|
[
"Mycard"
,
"管理中心 -
#{
controller
.
params
[
:action
].
try
(
:titleize
)
}
"
]
}
config
.
authenticate_with
&
:authenticate_admin!
class
FakeUser
def
self
.
username
'admin'
end
def
self
.
email
'zh99998@gmail.com'
end
end
RailsAdmin
.
config
do
|
config
|
config
.
current_user_method
do
authenticate_or_request_with_http_basic
do
|
username
,
password
|
p
username
,
password
,
username
==
"admin"
&&
password
==
"mycard.web"
username
==
"admin"
&&
password
==
"mycard.web"
end
FakeUser
end
config
.
authenticate_with
{}
end
end
\ No newline at end of file
public/images/boards/ygocore-banner.png
View replaced file @
7603cd79
View file @
d41a9831
865 KB
|
W:
|
H:
657 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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