diff --git a/app/models/contact.rb b/app/models/contact.rb index 1a6f0ac..8260639 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -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 diff --git a/app/views/shared/_admin_bar.html.erb b/app/views/shared/_admin_bar.html.erb index 6d51d1a..294cef6 100644 --- a/app/views/shared/_admin_bar.html.erb +++ b/app/views/shared/_admin_bar.html.erb @@ -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 %> diff --git a/config/environments/development.rb b/config/environments/development.rb index 124e929..2c5e791 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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 \ No newline at end of file +#config.action_mailer.smtp_settings = MY_SMTP_SETTINGS