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