You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by ws...@apache.org on 2009/03/14 17:29:23 UTC

svn commit: r754497 - /incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb

Author: wsobel
Date: Sat Mar 14 17:29:23 2009
New Revision: 754497

URL: http://svn.apache.org/viewvc?rev=754497&view=rev
Log:
Fix for OLIO-72: Added geocoding to create user

Modified:
    incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb

Modified: incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb?rev=754497&r1=754496&r2=754497&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb (original)
+++ incubator/olio/webapp/rails/trunk/app/controllers/users_controller.rb Sat Mar 14 17:29:23 2009
@@ -72,6 +72,9 @@
   def create
     @user = User.new(params[:user])
     @address = Address.new(params[:address])
+    @geolocation = Geolocation.new(@address.street1, @address.city, @address.state, @address.zip)
+    @address.longitude = @geolocation.longitude
+    @address.latitude = @geolocation.latitude
     begin
       User.transaction do
         @user.image = Image.make_from_upload params[:user_image], @user.id if new_image?