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
GaiaXalter
Ygopro Arena Web
Commits
4e6825a7
Commit
4e6825a7
authored
May 24, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
继续修复注册问题,去除devise
parent
e4326515
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+2
-2
app/models/user.rb
app/models/user.rb
+3
-3
No files found.
app/controllers/users_controller.rb
View file @
4e6825a7
...
...
@@ -61,8 +61,8 @@ class UsersController < ApplicationController
def
create
@user
=
User
.
new
(
params
[
:user
])
#不知道什么原因,加了devise之后那两个字段就奇怪的变成空了
@user
.
name
=
params
[
:user
][
:name
]
@user
.
password
=
params
[
:user
][
:password
]
#
@user.name = params[:user][:name]
#
@user.password = params[:user][:password]
@actions
=
[
User
.
human_attribute_name
(
:register
)]
respond_to
do
|
format
|
if
@user
.
save
...
...
app/models/user.rb
View file @
4e6825a7
...
...
@@ -3,10 +3,10 @@ class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:trackable
,
:validatable
#
devise :database_authenticatable, :registerable,
#
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
#
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
}
"
}
...
...
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