Skip to content

Commit

Permalink
Remove outgoing SMTP stuff. Fix admin bar routing.
Browse files Browse the repository at this point in the history
  • Loading branch information
djcp committed Nov 18, 2009
1 parent 0854521 commit d449b8a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def email(which=:primary)
end
end

def primary_email
pe = get_primary_email
return pe && pe.email
end

def get_primary_email(amount=:first)
pe = self.contact_emails.find(amount, :order => 'is_primary desc, id')
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_admin_bar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= link_to 'Contacts', :controller => '/admin/dashboard', :action => :contacts %>
<%= link_to 'Tags', :controller => '/admin/dashboard', :action => :tags %>
<%= link_to 'Notes', :controller => '/notes', :action => :my, :id => 'show' %>
<%= link_to 'Search', :controller => '/admin/saved_search' %>
<%= link_to 'Search', :controller => '/saved_searches' %>
<%= link_to 'Mail Campaigns', freemailer_campaigns_path %>
</div>

Expand Down
8 changes: 4 additions & 4 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = true

load 'config/secret.rb'
require 'smtp-tls'
config.action_mailer.delivery_method = :smtp
#load 'config/secret.rb'
#require 'smtp-tls'
config.action_mailer.delivery_method = :sendmail
config.action_mailer.perform_deliveries = true
config.action_mailer.default_charset = "utf-8"
config.action_mailer.default_content_type = "text/plain"
config.action_mailer.smtp_settings = MY_SMTP_SETTINGS
#config.action_mailer.smtp_settings = MY_SMTP_SETTINGS

0 comments on commit d449b8a

Please sign in to comment.