Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Broworkers
RailsPG
Commits
ec1935f8
Commit
ec1935f8
authored
Oct 14, 2012
by
Daniel Libanori
Browse files
Chaning user to form
parent
da13d1dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+3
-1
app/views/users/show.html.haml
app/views/users/show.html.haml
+8
-9
No files found.
app/controllers/users_controller.rb
View file @
ec1935f8
...
...
@@ -10,7 +10,9 @@ class UsersController < ApplicationController
end
def
update
current_user
.
update_attributes
params
[
:user
]
@user
=
User
.
find
(
params
[
:id
])
@user
.
update_attributes
(
params
[
:user
])
head
status:
200
end
end
app/views/users/show.html.haml
View file @
ec1935f8
.sheet
%button
.close
%h2
Sir Lancelot
%h3
Character Sheet
%form
%fieldset
=
find_and_preserve
do
%textarea
=
@user
.
sheet
%input
(
type=
"Submit"
value=
"Save"
)
%button
.close
%h2
Sir Lancelot
%h3
Character Sheet
=
form_for
@user
do
|
form
|
%fieldset
=
find_and_preserve
do
=
form
.
text_area
:sheet
%input
(
type=
"Submit"
value=
"Save"
)
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