Commit 462c0b8972c1db2b5e45269ac3086661fd9e682b
1 parent
72c560f6
Exists in
master
and in
29 other branches
ActionItem6: enterprise controller update
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@179 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
app/controllers/enterprise_controller.rb
1 | 1 | # Manage enterprises by providing an interface to register, activate and manage them |
2 | 2 | class EnterpriseController < ApplicationController |
3 | 3 | |
4 | + def register | |
5 | + unless logged_in? | |
6 | + redirect_to :controller => 'account' | |
7 | + end | |
8 | + end | |
9 | + | |
4 | 10 | def register_form |
5 | 11 | @vitual_communities = VirtualCommunity.find(:all) |
6 | 12 | end |
... | ... | @@ -13,10 +19,10 @@ class EnterpriseController < ApplicationController |
13 | 19 | @enterprise = Enterprise.new(params[:enterprise]) |
14 | 20 | if @enterprise.save |
15 | 21 | flash[:notice] = _('Enterprise was succesfully created') |
16 | - redirect_to :action => '' | |
22 | + redirect_to :action => 'register' | |
17 | 23 | else |
18 | 24 | flash[:notice] = _('Enterprise was not created') |
19 | - render :text => 'Não Salvou' | |
25 | + render :action => 'choose_validation_entity_or_net' | |
20 | 26 | end |
21 | 27 | end |
22 | 28 | end | ... | ... |