From a748494a649e432e5f37a7ad1ff987560594256c Mon Sep 17 00:00:00 2001 From: DanielaFeitosa Date: Thu, 26 Jul 2007 16:39:15 +0000 Subject: [PATCH] ActionItem6: enterprise controller update --- app/controllers/enterprise_controller.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/enterprise_controller.rb b/app/controllers/enterprise_controller.rb index 04ce77e..9ada30e 100644 --- a/app/controllers/enterprise_controller.rb +++ b/app/controllers/enterprise_controller.rb @@ -5,15 +5,18 @@ class EnterpriseController < ApplicationController @vitual_communities = VirtualCommunity.find(:all) end + def choose_validation_entity_or_net + @enterprise = Enterprise.new(params[:enterprise]) + end + def create @enterprise = Enterprise.new(params[:enterprise]) if @enterprise.save - redirect_to :action => 'choose_validation_entity_or_net' + flash[:notice] = _('Enterprise was succesfully created') + redirect_to :action => '' else - render :action => 'register_form' + flash[:notice] = _('Enterprise was not created') + render :text => 'Não Salvou' end end - - def choose_validation_entity_or_net - end end -- libgit2 0.21.2