- if params[:user][:description] != user.description
- user.description = params[:user][:description]
- user.description_format = "markdown"
- end
-
- user.languages = params[:user][:languages].split(",")
-
- case params[:avatar_action]
- when "new"
- user.avatar.attach(params[:user][:avatar])
- user.image_use_gravatar = false
- when "delete"
- user.avatar.purge_later
- user.image_use_gravatar = false
- when "gravatar"
- user.avatar.purge_later
- user.image_use_gravatar = true
- end
-
- user.home_lat = params[:user][:home_lat]
- user.home_lon = params[:user][:home_lon]
-
- user.preferred_editor = if params[:user][:preferred_editor] == "default"
- nil
- else
- params[:user][:preferred_editor]
- end
-