]> git.openstreetmap.org Git - rails.git/commitdiff
Sorts out a problem with the description field and adding users.
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Tue, 8 Jul 2008 13:43:56 +0000 (13:43 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Tue, 8 Jul 2008 13:43:56 +0000 (13:43 +0000)
app/controllers/user_controller.rb

index fd58145c47db8fcda56353fc0ff224361e9f9431..f2378f36d33caea9ec49fc34421ed3529637cb3f 100644 (file)
@@ -14,7 +14,8 @@ class UserController < ApplicationController
     @user = User.new(params[:user])
 
     @user.data_public = true
-      
+    @user.description = "" if @user.description.nil?
+
     if @user.save
       token = @user.tokens.create
       flash[:notice] = "User was successfully created. Check your email for a confirmation note, and you\'ll be mapping in no time :-)<br>Please note that you won't be able to login until you've received and confirmed your email address."