Commit a748494a649e432e5f37a7ad1ff987560594256c
1 parent
b149f955
Exists in
master
and in
29 other branches
ActionItem6: enterprise controller update
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@172 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
8 additions
and
5 deletions
Show diff stats
app/controllers/enterprise_controller.rb
| ... | ... | @@ -5,15 +5,18 @@ class EnterpriseController < ApplicationController |
| 5 | 5 | @vitual_communities = VirtualCommunity.find(:all) |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | + def choose_validation_entity_or_net | |
| 9 | + @enterprise = Enterprise.new(params[:enterprise]) | |
| 10 | + end | |
| 11 | + | |
| 8 | 12 | def create |
| 9 | 13 | @enterprise = Enterprise.new(params[:enterprise]) |
| 10 | 14 | if @enterprise.save |
| 11 | - redirect_to :action => 'choose_validation_entity_or_net' | |
| 15 | + flash[:notice] = _('Enterprise was succesfully created') | |
| 16 | + redirect_to :action => '' | |
| 12 | 17 | else |
| 13 | - render :action => 'register_form' | |
| 18 | + flash[:notice] = _('Enterprise was not created') | |
| 19 | + render :text => 'Não Salvou' | |
| 14 | 20 | end |
| 15 | 21 | end |
| 16 | - | |
| 17 | - def choose_validation_entity_or_net | |
| 18 | - end | |
| 19 | 22 | end | ... | ... |