From 5d91f910005a99f02438b2308a61770f414797f3 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Sun, 21 Jun 2009 20:37:59 -0300 Subject: [PATCH] fixing bugs on account controller --- UPGRADE | 8 ++++++++ app/controllers/public/account_controller.rb | 3 ++- app/models/environment.rb | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/UPGRADE b/UPGRADE index 68c4dda..f1bc767 100644 --- a/UPGRADE +++ b/UPGRADE @@ -20,6 +20,14 @@ on lib/acts_as_having_settings I used the solution 1. +I choose solution number 2 for Environment model. I think it is more clear in this situation. +I put the code: + + self.partial_updates = false + +on Environment model. + + 4 - acts_as_searchable -> find_by_contents I solved an incompatibility between paginate and geokit with an work around like this the one explained on the link: diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 4f7a3da..dcc0b37 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -49,7 +49,8 @@ class AccountController < ApplicationController @user.terms_of_use = environment.terms_of_use @user.environment = environment @terms_of_use = environment.terms_of_use - @person = @user.build_person(params[:profile_data]) + @person = Person.new(params[:profile_data]) + @person.name = @user.login @person.environment = @user.environment if request.post? && params[self.icaptcha_field].blank? @user.signup! diff --git a/app/models/environment.rb b/app/models/environment.rb index 0230ae8..4624f94 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -3,6 +3,8 @@ # domains. class Environment < ActiveRecord::Base + self.partial_updates = false + has_many :tasks, :dependent => :destroy, :as => 'target' PERMISSIONS['Environment'] = { -- libgit2 0.21.2