From 462c0b8972c1db2b5e45269ac3086661fd9e682b Mon Sep 17 00:00:00 2001 From: DanielaFeitosa Date: Thu, 26 Jul 2007 20:03:53 +0000 Subject: [PATCH] ActionItem6: enterprise controller update --- app/controllers/enterprise_controller.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/enterprise_controller.rb b/app/controllers/enterprise_controller.rb index 9ada30e..b015a04 100644 --- a/app/controllers/enterprise_controller.rb +++ b/app/controllers/enterprise_controller.rb @@ -1,6 +1,12 @@ # Manage enterprises by providing an interface to register, activate and manage them class EnterpriseController < ApplicationController + def register + unless logged_in? + redirect_to :controller => 'account' + end + end + def register_form @vitual_communities = VirtualCommunity.find(:all) end @@ -13,10 +19,10 @@ class EnterpriseController < ApplicationController @enterprise = Enterprise.new(params[:enterprise]) if @enterprise.save flash[:notice] = _('Enterprise was succesfully created') - redirect_to :action => '' + redirect_to :action => 'register' else flash[:notice] = _('Enterprise was not created') - render :text => 'Não Salvou' + render :action => 'choose_validation_entity_or_net' end end end -- libgit2 0.21.2