projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02542c9
)
Set the user description to markdown formatting when it changes
author
Tom Hughes
<tom@compton.nu>
Sat, 17 Mar 2012 16:10:58 +0000
(16:10 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 17 Mar 2012 16:37:22 +0000
(16:37 +0000)
app/controllers/user_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/user_controller.rb
b/app/controllers/user_controller.rb
index 0aeab63b37f10db726a2a67d5f4a4620c96c9c0b..a086c9f697e86ed10cf5229213bd7150e1b50498 100644
(file)
--- a/
app/controllers/user_controller.rb
+++ b/
app/controllers/user_controller.rb
@@
-151,7
+151,11
@@
class UserController < ApplicationController
@user.pass_crypt_confirmation = params[:user][:pass_crypt_confirmation]
end
- @user.description = params[:user][:description]
+ if params[:user][:description] != @user.description
+ @user.description = params[:user][:description]
+ @user.description_format = "markdown"
+ end
+
@user.languages = params[:user][:languages].split(",")
case params[:image_action]