Skip to content

Commit

Permalink
Stop storing latitude and longitude in our database.
Browse files Browse the repository at this point in the history
  • Loading branch information
konklone committed Dec 3, 2013
1 parent 00f3303 commit 872b0ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions config/environment.rb
Expand Up @@ -29,7 +29,7 @@ def self.check_key?

configure do
enable :cross_origin

Mongoid.load! File.join(File.dirname(__FILE__), "mongoid.yml")

Searchable.configure_clients!
Expand All @@ -42,7 +42,7 @@ def self.check_key?

# utilities for sending email
class Email

def self.message(message)
send_email message, message, config[:recipients][:admin]
end
Expand All @@ -55,9 +55,9 @@ def self.report(report)
if report['attached']['exception']
body += "\n\n#{report.exception_message}"
end

attrs = report.attributes.dup

[:status, :created_at, :updated_at, :_id, :message, :exception, :read, :source].each {|key| attrs.delete key.to_s}

attrs['attached'].delete 'exception'
Expand All @@ -70,19 +70,19 @@ def self.report(report)
# admin + any task-specific owners
def self.email_recipients_for(report)
task = report.source.underscore.to_sym

recipients = Environment.config[:recipients][:admin].dup
if task_owners = Environment.config[:recipients][task]
recipients += task_owners
recipients += task_owners
end
recipients.uniq
end

def self.send_email(subject, body, to)
if Environment.config[:email][:from]
Pony.mail Environment.config[:email].merge(
subject: subject,
body: body,
subject: subject,
body: body,
to: to
)
else
Expand Down
4 changes: 2 additions & 2 deletions congress.rb
Expand Up @@ -242,8 +242,8 @@ def hit!(method_type, format)
extras[:zip] = params[:zip]
elsif params[:latitude] and params[:longitude]
method += ".latlng"
extras[:latitude] = params[:latitude]
extras[:longitude] = params[:longitude]
# Specifically do NOT store latitude and longitude.
# We promise this in our API documentation.
end
elsif method_type == "search"
method += ".search"
Expand Down

0 comments on commit 872b0ee

Please sign in to comment.