Skip to content

Commit

Permalink
Merge branch 'release-3-0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Saimon Moore committed Mar 25, 2011
2 parents 09dd951 + 35d9e45 commit ea8a590
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/controllers/projects_controller.rb
Expand Up @@ -65,7 +65,9 @@ def create

respond_to do |f|
if @project.save
f.html { redirect_to project_invite_people_path(@project) }
redirect_path = redirect_to_invite_people? ? project_invite_people_path(@project) : @project

f.html { redirect_to redirect_path }
f.m { redirect_to @project }
else
flash.now[:error] = t('projects.new.invalid_project')
Expand Down Expand Up @@ -207,4 +209,8 @@ def disallow_for_community
end
end

def redirect_to_invite_people?
Rails.env.cucumber? || Teambox.config.allow_outgoing_email?
end

end
5 changes: 5 additions & 0 deletions config/application.rb
Expand Up @@ -87,6 +87,11 @@ def config.from_file(file)
if allow_outgoing_email
action_mailer.delivery_method = :smtp
action_mailer.smtp_settings = smtp_settings.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
else
unless Rails.env.test? || Rails.env.cucumber?
action_mailer.delivery_method = :test
self.email_confirmation_require = false
end
end

end
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -52,7 +52,7 @@
# )

# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.raise_delivery_errors = false

# RAILS3 fixme
# config.action_mailer.delivery_method = :smtp
Expand Down

0 comments on commit ea8a590

Please sign in to comment.