]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into moderation
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 11 Apr 2018 01:54:04 +0000 (09:54 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 11 Apr 2018 01:54:04 +0000 (09:54 +0800)
1  2 
Gemfile.lock
app/assets/stylesheets/common.scss
app/models/user.rb
app/views/diary_entry/_diary_comment.html.erb
app/views/diary_entry/_diary_entry.html.erb
app/views/user/view.html.erb
config/locales/en.yml
config/routes.rb
db/structure.sql
test/test_helper.rb

diff --combined Gemfile.lock
index 02bb3e5fdbeaf3634243e6ca46721cdddf7caaa2,e4448fddc0dff354727881ff097262786f3c7ba3..d1a9a0dd2ffb18f048cb34537d3377f10147a20d
@@@ -2,7 -2,6 +2,7 @@@ GE
    remote: https://rubygems.org/
    specs:
      SystemTimer (1.2.3)
 +    aasm (4.1.0)
      actioncable (5.1.5)
        actionpack (= 5.1.5)
        nio4r (~> 2.0)
@@@ -49,7 -48,7 +49,7 @@@
        rake (>= 10.4, < 13.0)
      arel (8.0.0)
      ast (2.4.0)
-     autoprefixer-rails (8.0.0)
+     autoprefixer-rails (8.2.0)
        execjs
      bigdecimal (1.1.0)
      builder (3.2.3)
@@@ -64,8 -63,6 +64,6 @@@
        xpath (>= 2.0, < 4.0)
      climate_control (0.2.0)
      cliver (0.3.2)
-     cocaine (0.5.8)
-       climate_control (>= 0.0.3, < 1.0)
      coffee-rails (4.2.2)
        coffee-script (>= 2.2.0)
        railties (>= 4.0.0)
@@@ -88,7 -85,7 +86,7 @@@
      dalli (2.7.6)
      docile (1.1.5)
      dynamic_form (1.1.4)
-     erubi (1.7.0)
+     erubi (1.7.1)
      execjs (2.7.0)
      exifr (1.3.3)
      factory_bot (4.8.2)
        multipart-post (>= 1.2, < 3)
      ffi (1.9.23)
      fspath (3.1.0)
-     geoip (1.6.3)
+     geoip (1.6.4)
      globalid (0.4.1)
        activesupport (>= 4.2.0)
      hashdiff (0.3.7)
      http_accept_language (2.0.5)
      i18n (0.9.5)
        concurrent-ruby (~> 1.0)
-     i18n-js (3.0.4)
-       i18n (~> 0.6, >= 0.6.6)
+     i18n-js (3.0.5)
+       i18n (>= 0.6.6, < 2)
      image_optim (0.26.1)
        exifr (~> 1.2, >= 1.2.2)
        fspath (~> 3.0)
        activesupport (>= 4.0)
        logstash-event (~> 1.2.0)
        request_store
-     loofah (2.2.0)
+     loofah (2.2.2)
        crass (~> 1.0.2)
        nokogiri (>= 1.5.9)
      mail (2.7.0)
      multi_json (1.13.1)
      multi_xml (0.6.0)
      multipart-post (2.0.0)
-     nio4r (2.2.0)
+     nio4r (2.3.0)
      nokogiri (1.8.2)
        mini_portile2 (~> 2.3.0)
      nokogumbo (1.5.0)
        multi_json (~> 1.12)
        omniauth-oauth2 (~> 1.4)
      openstreetmap-deadlock_retry (1.3.0)
-     paperclip (5.2.1)
+     paperclip (5.3.0)
        activemodel (>= 4.2.0)
        activesupport (>= 4.2.0)
-       cocaine (~> 0.5.5)
        mime-types
        mimemagic (~> 0.3.0)
+       terrapin (~> 0.6.0)
      parallel (1.12.1)
-     parser (2.5.0.2)
+     parser (2.5.0.5)
        ast (~> 2.4.0)
      pg (0.21.0)
      poltergeist (1.17.0)
      progress (3.4.0)
      psych (3.0.2)
      public_suffix (3.0.2)
-     puma (3.11.2)
+     puma (3.11.3)
      r2 (0.2.7)
      rack (2.0.4)
      rack-cors (1.0.2)
      rack-openid (1.3.1)
        rack (>= 1.1.0)
        ruby-openid (>= 2.1.8)
-     rack-test (0.8.2)
+     rack-test (0.8.3)
        rack (>= 1.0, < 3)
      rack-uri_sanitizer (0.0.2)
      rails (5.1.5)
      rails-dom-testing (2.0.3)
        activesupport (>= 4.2.0)
        nokogiri (>= 1.6)
-     rails-html-sanitizer (1.0.3)
-       loofah (~> 2.0)
+     rails-html-sanitizer (1.0.4)
+       loofah (~> 2.2, >= 2.2.2)
      rails-i18n (4.0.2)
        i18n (~> 0.6)
        rails (>= 4.0)
        rake (>= 0.8.7)
        thor (>= 0.18.1, < 2.0)
      rainbow (3.0.0)
-     rake (12.3.0)
-     rb-fsevent (0.10.2)
+     rake (12.3.1)
+     rb-fsevent (0.10.3)
      rb-inotify (0.9.10)
        ffi (>= 0.5.0, < 2)
      record_tag_helper (1.0.0)
        actionview (~> 5.x)
      redcarpet (3.4.0)
      ref (2.0.0)
-     request_store (1.4.0)
+     request_store (1.4.1)
        rack (>= 1.4)
      rinku (2.0.4)
-     rotp (3.3.0)
-     rubocop (0.52.1)
+     rotp (3.3.1)
+     rubocop (0.54.0)
        parallel (~> 1.10)
-       parser (>= 2.4.0.2, < 3.0)
+       parser (>= 2.5)
        powerpack (~> 0.1)
        rainbow (>= 2.2.2, < 4.0)
        ruby-progressbar (~> 1.7)
      ruby-progressbar (1.9.0)
      ruby_dep (1.5.0)
      safe_yaml (1.0.4)
-     sanitize (4.6.0)
+     sanitize (4.6.4)
        crass (~> 1.0.2)
        nokogiri (>= 1.4.4)
        nokogumbo (~> 1.4)
-     sass (3.5.5)
+     sass (3.5.6)
        sass-listen (~> 4.0.0)
      sass-listen (4.0.0)
        rb-fsevent (~> 0.9, >= 0.9.4)
        sprockets (>= 3.0.0)
      term-ansicolor (1.6.0)
        tins (~> 1.0)
+     terrapin (0.6.0)
+       climate_control (>= 0.0.3, < 1.0)
      therubyracer (0.12.3)
        libv8 (~> 3.16.14.15)
        ref
      tins (1.16.3)
      tzinfo (1.2.5)
        thread_safe (~> 0.1)
-     uglifier (4.1.6)
+     uglifier (4.1.8)
        execjs (>= 0.3.0, < 3)
      unicode-display_width (1.3.0)
      useragent (0.16.10)
@@@ -355,7 -354,6 +355,7 @@@ PLATFORM
  
  DEPENDENCIES
    SystemTimer (>= 1.1.3)
 +  aasm
    actionpack-page_caching
    annotate
    autoprefixer-rails
index f2df4d1918933fe41cf525ec8f738b6180ad6b1e,0a5d9164e211e3ef5db259c8e0dcb78054919637..50b38e7a358e368257f8cb862554791eb708b110
@@@ -938,6 -938,10 +938,10 @@@ header .search_forms
      border-radius: 0 2px 2px 0;
    }
  
+   input.error {
+     background-color: rgba($red, 0.4);
+   }
    select {
      /* this next line is to polyfill the vertical alignment of text within a select element,
       * which is different between firefox and chrome. */
@@@ -2818,59 -2822,3 +2822,59 @@@ input.richtext_title[type="text"] 
      display: none;
    }
  }
 +
 +.read-reports {
 +  background: #eee;
 +  opacity: 0.7;
 +}
 +
 +.report-related-block {
 +  display:inline-block;
 +}
 +
 +.report-block {
 +  width:475px;
 +  float:left;
 +  margin-right:100px;
 +}
 +
 +.related-reports {
 +  width: 280px;
 +  float: right;
 +
 +  ul {
 +    padding-left: $lineheight;
 +    margin-bottom: 0;
 +
 +    li {
 +      list-style: disc;
 +    }
 +  }
 +}
 +
 +.issue-comments {
 +  width:475px;
 +}
 +
 +.issues-list {
 +  td:nth-child(2) {
 +    white-space: nowrap;
 +  }
 +}
 +
 +.report-disclaimer {
 +  background: #fff1f0;
 +  color: #d85030;
 +  border-color: rgba(216, 80, 48, 0.3);
 +  padding: 10px 20px;
 +  margin-bottom: $lineheight;
 +
 +  ul {
 +    padding-left: $lineheight;
 +    margin-bottom: 0;
 +
 +    li {
 +      list-style: disc;
 +    }
 +  }
 +}
diff --combined app/models/user.rb
index c063b7c34b6f4babce1bff7b4eda0efadf13e59f,da3964142fb60a3c65e4bca7704a0b72a9eca2c5..2a0a5ab4508f2c193c048cf3eeb24edff5262fdc
@@@ -33,6 -33,7 +33,7 @@@
  #  image_use_gravatar  :boolean          default(FALSE), not null
  #  image_content_type  :string
  #  auth_provider       :string
+ #  home_tile           :integer
  #
  # Indexes
  #
@@@ -41,6 -42,7 +42,7 @@@
  #  users_display_name_lower_idx  (lower((display_name)::text))
  #  users_email_idx               (email) UNIQUE
  #  users_email_lower_idx         (lower((email)::text))
+ #  users_home_idx                (home_tile)
  #
  
  class User < ActiveRecord::Base
  
    has_many :roles, :class_name => "UserRole"
  
 +  has_many :issues, :class_name => "Issue", :foreign_key => :reported_user_id
 +  has_many :issue_comments
 +
 +  has_many :reports
 +
    scope :visible, -> { where(:status => %w[pending active confirmed]) }
    scope :active, -> { where(:status => %w[active confirmed]) }
    scope :identifiable, -> { where(:data_public => true) }
    validates :email, :if => proc { |u| u.email_changed? },
                      :uniqueness => { :case_sensitive => false }
    validates :pass_crypt, :confirmation => true, :length => 8..255
-   validates :home_lat, :home_lon, :allow_nil => true, :numericality => true
+   validates :home_lat, :allow_nil => true, :numericality => true, :inclusion => { :in => -90..90 }
+   validates :home_lon, :allow_nil => true, :numericality => true, :inclusion => { :in => -180..180 }
    validates :home_zoom, :allow_nil => true, :numericality => { :only_integer => true }
    validates :preferred_editor, :inclusion => Editors::ALL_EDITORS, :allow_nil => true
    validates :image, :attachment_content_type => { :content_type => %r{\Aimage/.*\Z} }
  
    after_initialize :set_defaults
    before_save :encrypt_password
+   before_save :update_tile
    after_save :spam_check
  
+   def to_param
+     display_name
+   end
    def self.authenticate(options)
      if options[:username] && options[:password]
        user = find_by("email = ? OR display_name = ?", options[:username], options[:username])
    end
  
    def preferred_languages
-     @locales ||= Locale.list(languages)
+     @preferred_languages ||= Locale.list(languages)
    end
  
    def nearby(radius = NEARBY_RADIUS, num = NEARBY_USERS)
      if home_lon && home_lat
        gc = OSM::GreatCircle.new(home_lat, home_lon)
+       sql_for_area = QuadTile.sql_for_area(gc.bounds(radius), "home_")
        sql_for_distance = gc.sql_for_distance("home_lat", "home_lon")
-       nearby = User.where("id != ? AND status IN (\'active\', \'confirmed\') AND data_public = ? AND #{sql_for_distance} <= ?", id, true, radius).order(sql_for_distance).limit(num)
+       nearby = User.active.identifiable
+                    .where("id != ?", id)
+                    .where(sql_for_area)
+                    .where("#{sql_for_distance} <= ?", radius)
+                    .order(sql_for_distance)
+                    .limit(num)
      else
        nearby = []
      end
        self.pass_crypt_confirmation = nil
      end
    end
+   def update_tile
+     self.home_tile = QuadTile.tile_for_point(home_lat, home_lon) if home_lat && home_lon
+   end
  end
index 708bdd49d2024eb63e6b8aa7aa4b28c8eaca831b,43f8cbbc1b8ecd0e836ff95660724bbebdd2d140..8e17b095422a86c0681511c87fce68c97e5eaa14
@@@ -1,11 -1,6 +1,11 @@@
  <div class="clearfix diary-comment">
    <%= user_thumbnail diary_comment.user %>
-   <p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %>
 -  <p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %></p>
++  <p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %>
 +    <% if current_user and diary_comment.user.id != current_user.id %>
 +      | <%= report_link(t(".report"), diary_comment) %>
 +    <% end %>
 +  </p>
 +
    <div class="richtext"><%= diary_comment.body.to_html %></div>
    <%= if_administrator(:span) do %>
      <%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %>
index d8ca41eafae9c8ac2cc9ce77cbdcfa8c854c3031,763915e46cb15937a62e8e737b9a0ec722824430..ce311c168f5798ed3c464f558ccc6a2e2e5589dd
@@@ -7,7 -7,7 +7,7 @@@
      <h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
  
      <small class='deemphasize'>
-       <%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
+       <%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
      </small>
  
    </div>
        <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
      <% end %>
  
 +    <% if current_user and diary_entry.user != current_user %>
 +      <li>
 +        <%= report_link(t(".report"), diary_entry) %>
 +      </li>
 +    <% end %>
 +
      <%= if_administrator(:li) do %>
        <%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %>
      <% end %>
index b81d980a529e5172a36e7baf8a92ab72dc4d58a7,119fe10a4d30ac1b46af691ac0b010d9ecd2456b..f797c4ba4e742ffb7bc406782ff38a427c44eeb0
              </li>
            <% end %>
  
 +          <% if current_user and @this_user.id != current_user.id %>
 +            <li>
 +              <%= report_link(t(".report"), @this_user) %>
 +            </li>
 +          <% end %>
          </ul>
  
        <% end %>
      <% nearby = @this_user.nearby - friends %>
  
    <div class="activity-block column-1">
-     <h3><%= t 'user.view.your friends' %></h3>
+     <h3><%= t 'user.view.my friends' %></h3>
  
      <% if friends.empty? %>
        <%= t 'user.view.no friends' %>
diff --combined config/locales/en.yml
index f5fe7c325680adceeac0ae763101b87646b80f7d,7df06b2771e4ca351c3b880445a8909e452ac73d..18ea59bf4f4638ca26015ad6382f3c558fec4594
@@@ -207,7 -207,6 +207,7 @@@ en
        reopened_by: "Reactivated by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
        reopened_by_anonymous: "Reactivated by anonymous <abbr title='%{exact_time}'>%{when} ago</abbr>"
        hidden_by: "Hidden by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
 +      report: Report this note
      query:
        title: "Query Features"
        introduction: "Click on the map to find nearby features."
      list:
        title: "Changesets"
        title_user: "Changesets by %{user}"
-       title_friend: "Changesets by your friends"
+       title_friend: "Changesets by my friends"
        title_nearby: "Changesets by nearby users"
        empty: "No changesets found."
        empty_area: "No changesets in this area."
        user_title: "%{user}'s diary"
        in_language_title: "Diary Entries in %{language}"
        new: New Diary Entry
-       new_title: Compose a new entry in your user diary
+       new_title: Compose a new entry in my user diary
        no_entries: No diary entries
        recent_entries: "Recent diary entries"
        older_entries: Older Entries
        edit_link: Edit this entry
        hide_link: Hide this entry
        confirm: Confirm
 +      report: Report this entry
      diary_comment:
        comment_from: "Comment from %{link_user} on %{comment_created_at}"
        hide_link: Hide this comment
        confirm: Confirm
 +      report: Report this comment
      location:
        location: "Location:"
        view: "View"
      results:
        no_results: "No results found"
        more_results: "More results"
 +  issues:
 +    report: Report
 +    resolve: Resolve
 +    ignore: Ignore
 +    reopen: Reopen
 +    index:
 +      title: Issues
 +      select_status: Select Status
 +      select_type: Select Type
 +      select_last_updated_by: Select Last Updated By
 +      reported_user: Reported User
 +      not_updated: Not Updated
 +      search: Search
 +      search_guidance: "Search Issues:"
 +      user_not_found: User does not exist
 +      issues_not_found: No such issues found
 +      status: Status
 +      reports: Reports
 +      last_updated: Last Updated
 +      last_updated_time_html: "<abbr title='%{title}'>%{time} ago</abbr>"
 +      last_updated_time_user_html: "<abbr title='%{title}'>%{time} ago</abbr> by %{user}"
 +      link_to_reports: View Reports
 +      reported_user: Reported User
 +      reports_count:
 +        one: "1 Report"
 +        other: "%{count} Reports"
 +      reported_item: Reported Item
 +    create:
 +      successful_report: Your report has been registered sucessfully
 +      provide_details: Please provide the required details
 +    update:
 +      new_report: Your report has been registered sucessfully
 +      successful_update: Your report has been updated successfully
 +      provide_details: Please provide the required details
 +    new:
 +      details: Please provide some more details about the problem (required).
 +      select: "Select a reason for your report:"
 +      disclaimer:
 +        intro: "Before sending your report to the site moderators, please ensure that:"
 +        not_just_mistake: You are certain that the problem is not just a mistake
 +        unable_to_fix: You are unable to fix the problem yourself or with the help of your fellow community members
 +        resolve_with_user: You have already tried to resolve the problem with the user concerned
 +    show:
 +      title: "%{status} Issue #%{issue_id}"
 +      reports:
 +        zero: No reports
 +        one: 1 report
 +        other: "%{count} reports"
 +      report_created_at: "First reported at %{datetime}"
 +      last_resolved_at: "Last resolved at %{datetime}"
 +      last_updated_at: "Last updated at %{datetime} by %{displayname}"
 +      reports_of_this_issue: Reports of this Issue
 +      read_reports: Read Reports
 +      new_reports: New Reports
 +      other_issues_against_this_user: Other issues against this user
 +      no_other_issues: No other issues against this user.
 +      comments_on_this_issue: Comments on this issue
 +      comments:
 +        reassign_param: Reassign Issue?
 +    comment:
 +      provide_details: Please provide the required details
 +      comment_created: Your comment was successfully created
 +    comments:
 +      created_at: "On %{datetime}"
 +    reports:
 +      updated_at: "On %{datetime}"
 +      reported_by_html: "Reported as %{category} by %{user}"
 +    resolved: Issue status has been set to 'Resolved'
 +    ignored: Issue status has been set to 'Ignored'
 +    reopened: Issue status has been set to 'Open'
 +    states:
 +      ignored: Ignored
 +      open: Open
 +      resolved: Resolved
 +  reports:
 +    new:
 +      title_html: "Report %{link}"
 +      missing_params: "Cannot create a new report"
 +    categories:
 +      diary_entry:
 +        spam: This diary entry is/contains spam
 +        offensive: This diary entry is obscene/offensive
 +        threat: This diary entry contains a threat
 +        other: Other
 +      diary_comment:
 +        spam: This diary comment is/contains spam
 +        offensive: This diary comment is obscene/offensive
 +        threat: This diary comment contains a threat
 +        other: Other
 +      user:
 +        spam: This user profile is/contains spam
 +        offensive: This user profile is obscene/offensive
 +        threat: This user profile contains a threat
 +        vandal: This user is a vandal
 +        other: Other
 +      note:
 +        spam: This note is spam
 +        personal: This note contains personal data
 +        abusive: This note is abusive
 +        other: Other
    layouts:
      project_name:
        # in <title>
      edit: Edit
      history: History
      export: Export
 +    issues: Issues
      data: Data
      export_data: Export Data
      gps_traces: GPS Traces
        Acceptable Use Policies</a> and our <a href="https://wiki.osmfoundation.org/wiki/Privacy_Policy">Privacy Policy</a>
        <br>
        Please <a href='https://osmfoundation.org/Contact'>contact the OSMF</a>
-       if you have licensing, copyright or other legal questions and issues.
+       if you have licensing, copyright or other legal questions.
        <br>
        OpenStreetMap, the magnifying glass logo and State of the Map are <a href="https://wiki.osmfoundation.org/wiki/Trademark_Policy">registered trademarks of the OSMF</a>.
      partners_title: Partners
      trace_header:
        upload_trace: "Upload a trace"
        see_all_traces: "See all traces"
-       see_your_traces: "See your traces"
+       see_my_traces: "See my traces"
        traces_waiting:
          one: "You have %{count} trace waiting for upload. Please consider waiting for these to finish before uploading any more, so as not to block the queue for other users."
          other: "You have %{count} traces waiting for upload. Please consider waiting for these to finish before uploading any more, so as not to block the queue for other users."
        delete_track: "Delete this trace"
        trace_not_found: "Trace not found!"
        visibility: "Visibility:"
+       confirm_delete: "Delete this trace?"
      trace_paging_nav:
        showing_page: "Page %{page}"
        older: "Older Traces"
        map: "map"
      list:
        public_traces: "Public GPS traces"
-       your_traces: "Your GPS traces"
+       my_traces: "My GPS traces"
        public_traces_from: "Public GPS traces from %{user}"
        description: "Browse recent GPS trace uploads"
        tagged_with: " tagged with %{tags}"
    application:
      require_cookies:
        cookies_needed: "You appear to have cookies disabled - please enable cookies in your browser before continuing."
 +    require_admin:
 +      not_an_admin: You need to be an admin to perform that action.
      require_moderator:
        not_a_moderator: "You need to be a moderator to perform that action."
 +    require_moderator_or_admin:
 +      not_a_moderator_or_admin: You need to be a moderator or an admin to perform that action
      setup_user_auth:
        blocked_zero_hour: "You have an urgent message on the OpenStreetMap web site. You need to read the message before you will be able to save your edits."
        blocked: "Your access to the API has been blocked. Please log-in to the web interface to find out more."
        user location: User location
        if set location: "Set your home location on the %{settings_link} page to see nearby users."
        settings_link_text: settings
-       your friends: Your friends
+       my friends: My friends
        no friends: You have not added any friends yet.
        km away: "%{count}km away"
        m away: "%{count}m away"
        friends_diaries: "friends' diary entries"
        nearby_changesets: "nearby user changesets"
        nearby_diaries: "nearby user diary entries"
 +      report: Report this User
      popup:
        your location: "Your location"
        nearby mapper: "Nearby mapper"
        distance: "Distance"
        errors:
          no_route: "Couldn't find a route between those two places."
-         no_place: "Sorry - couldn't find that place."
+         no_place: "Sorry - couldn't locate '%{place}'."
        instructions:
          continue_without_exit: Continue on %{name}
          slight_right_without_exit: Slight right onto %{name}
          onramp_right_with_directions: Turn right onto the ramp towards %{directions}
          onramp_right_with_name_directions: Turn right on the ramp onto %{name}, towards %{directions}
          onramp_right_without_directions: Turn right onto the ramp
+         onramp_right: Turn right onto the ramp
          endofroad_right_without_exit: At the end of the road turn right onto %{name}
          merge_right_without_exit: Merge right onto %{name}
          fork_right_without_exit: At the fork turn right onto %{name}
          onramp_left_with_directions: Turn left onto the ramp towards %{directions}
          onramp_left_with_name_directions: Turn left on the ramp onto %{name}, towards %{directions}
          onramp_left_without_directions: Turn left onto the ramp
+         onramp_left: Turn left onto the ramp
          endofroad_left_without_exit: At the end of the road turn left onto %{name}
          merge_left_without_exit: Merge left onto %{name}
          fork_left_without_exit: At the fork turn left onto %{name}
diff --combined config/routes.rb
index 8160c878c6304172a4df5c4ac39312ac66b91788,1016a89de4c937fdc27fce2f8d551398e8cfa1fd..0c250b0cc34691d937b5b576e77b30d5b1f209aa
@@@ -1,91 -1,92 +1,92 @@@
  OpenStreetMap::Application.routes.draw do
    # API
-   match "api/capabilities" => "api#capabilities", :via => :get
-   match "api/0.6/capabilities" => "api#capabilities", :via => :get
-   match "api/0.6/permissions" => "api#permissions", :via => :get
-   match "api/0.6/changeset/create" => "changeset#create", :via => :put
-   match "api/0.6/changeset/:id/upload" => "changeset#upload", :via => :post, :id => /\d+/
-   match "api/0.6/changeset/:id/download" => "changeset#download", :via => :get, :as => :changeset_download, :id => /\d+/
-   match "api/0.6/changeset/:id/expand_bbox" => "changeset#expand_bbox", :via => :post, :id => /\d+/
-   match "api/0.6/changeset/:id" => "changeset#read", :via => :get, :as => :changeset_read, :id => /\d+/
-   match "api/0.6/changeset/:id/subscribe" => "changeset#subscribe", :via => :post, :as => :changeset_subscribe, :id => /\d+/
-   match "api/0.6/changeset/:id/unsubscribe" => "changeset#unsubscribe", :via => :post, :as => :changeset_unsubscribe, :id => /\d+/
-   match "api/0.6/changeset/:id" => "changeset#update", :via => :put, :id => /\d+/
-   match "api/0.6/changeset/:id/close" => "changeset#close", :via => :put, :id => /\d+/
-   match "api/0.6/changesets" => "changeset#query", :via => :get
-   post "api/0.6/changeset/:id/comment" => "changeset#comment", :as => :changeset_comment, :id => /\d+/
-   post "api/0.6/changeset/comment/:id/hide" => "changeset#hide_comment", :as => :changeset_comment_hide, :id => /\d+/
-   post "api/0.6/changeset/comment/:id/unhide" => "changeset#unhide_comment", :as => :changeset_comment_unhide, :id => /\d+/
-   match "api/0.6/node/create" => "node#create", :via => :put
-   match "api/0.6/node/:id/ways" => "way#ways_for_node", :via => :get, :id => /\d+/
-   match "api/0.6/node/:id/relations" => "relation#relations_for_node", :via => :get, :id => /\d+/
-   match "api/0.6/node/:id/history" => "old_node#history", :via => :get, :id => /\d+/
-   match "api/0.6/node/:id/:version/redact" => "old_node#redact", :via => :post, :version => /\d+/, :id => /\d+/
-   match "api/0.6/node/:id/:version" => "old_node#version", :via => :get, :id => /\d+/, :version => /\d+/
-   match "api/0.6/node/:id" => "node#read", :via => :get, :id => /\d+/
-   match "api/0.6/node/:id" => "node#update", :via => :put, :id => /\d+/
-   match "api/0.6/node/:id" => "node#delete", :via => :delete, :id => /\d+/
-   match "api/0.6/nodes" => "node#nodes", :via => :get
-   match "api/0.6/way/create" => "way#create", :via => :put
-   match "api/0.6/way/:id/history" => "old_way#history", :via => :get, :id => /\d+/
-   match "api/0.6/way/:id/full" => "way#full", :via => :get, :id => /\d+/
-   match "api/0.6/way/:id/relations" => "relation#relations_for_way", :via => :get, :id => /\d+/
-   match "api/0.6/way/:id/:version/redact" => "old_way#redact", :via => :post, :version => /\d+/, :id => /\d+/
-   match "api/0.6/way/:id/:version" => "old_way#version", :via => :get, :id => /\d+/, :version => /\d+/
-   match "api/0.6/way/:id" => "way#read", :via => :get, :id => /\d+/
-   match "api/0.6/way/:id" => "way#update", :via => :put, :id => /\d+/
-   match "api/0.6/way/:id" => "way#delete", :via => :delete, :id => /\d+/
-   match "api/0.6/ways" => "way#ways", :via => :get
-   match "api/0.6/relation/create" => "relation#create", :via => :put
-   match "api/0.6/relation/:id/relations" => "relation#relations_for_relation", :via => :get, :id => /\d+/
-   match "api/0.6/relation/:id/history" => "old_relation#history", :via => :get, :id => /\d+/
-   match "api/0.6/relation/:id/full" => "relation#full", :via => :get, :id => /\d+/
-   match "api/0.6/relation/:id/:version/redact" => "old_relation#redact", :via => :post, :version => /\d+/, :id => /\d+/
-   match "api/0.6/relation/:id/:version" => "old_relation#version", :via => :get, :id => /\d+/, :version => /\d+/
-   match "api/0.6/relation/:id" => "relation#read", :via => :get, :id => /\d+/
-   match "api/0.6/relation/:id" => "relation#update", :via => :put, :id => /\d+/
-   match "api/0.6/relation/:id" => "relation#delete", :via => :delete, :id => /\d+/
-   match "api/0.6/relations" => "relation#relations", :via => :get
-   match "api/0.6/map" => "api#map", :via => :get
-   match "api/0.6/trackpoints" => "api#trackpoints", :via => :get
-   match "api/0.6/changes" => "api#changes", :via => :get
-   match "api/0.6/search" => "search#search_all", :via => :get
-   match "api/0.6/ways/search" => "search#search_ways", :via => :get
-   match "api/0.6/relations/search" => "search#search_relations", :via => :get
-   match "api/0.6/nodes/search" => "search#search_nodes", :via => :get
-   match "api/0.6/user/:id" => "user#api_read", :via => :get, :id => /\d+/
-   match "api/0.6/user/details" => "user#api_details", :via => :get
-   match "api/0.6/user/gpx_files" => "user#api_gpx_files", :via => :get
-   match "api/0.6/user/preferences" => "user_preference#read", :via => :get
-   match "api/0.6/user/preferences/:preference_key" => "user_preference#read_one", :via => :get
-   match "api/0.6/user/preferences" => "user_preference#update", :via => :put
-   match "api/0.6/user/preferences/:preference_key" => "user_preference#update_one", :via => :put
-   match "api/0.6/user/preferences/:preference_key" => "user_preference#delete_one", :via => :delete
-   match "api/0.6/gpx/create" => "trace#api_create", :via => :post
-   match "api/0.6/gpx/:id" => "trace#api_read", :via => :get, :id => /\d+/
-   match "api/0.6/gpx/:id" => "trace#api_update", :via => :put, :id => /\d+/
-   match "api/0.6/gpx/:id" => "trace#api_delete", :via => :delete, :id => /\d+/
-   match "api/0.6/gpx/:id/details" => "trace#api_read", :via => :get, :id => /\d+/
-   match "api/0.6/gpx/:id/data" => "trace#api_data", :via => :get
-   # AMF (ActionScript) API
-   match "api/0.6/amf/read" => "amf#amf_read", :via => :post
-   match "api/0.6/amf/write" => "amf#amf_write", :via => :post
-   match "api/0.6/swf/trackpoints" => "swf#trackpoints", :via => :get
-   # Map notes API
+   get "api/capabilities" => "api#capabilities"
    scope "api/0.6" do
+     get "capabilities" => "api#capabilities"
+     get "permissions" => "api#permissions"
+     put "changeset/create" => "changeset#create"
+     post "changeset/:id/upload" => "changeset#upload", :id => /\d+/
+     get "changeset/:id/download" => "changeset#download", :as => :changeset_download, :id => /\d+/
+     post "changeset/:id/expand_bbox" => "changeset#expand_bbox", :id => /\d+/
+     get "changeset/:id" => "changeset#read", :as => :changeset_read, :id => /\d+/
+     post "changeset/:id/subscribe" => "changeset#subscribe", :as => :changeset_subscribe, :id => /\d+/
+     post "changeset/:id/unsubscribe" => "changeset#unsubscribe", :as => :changeset_unsubscribe, :id => /\d+/
+     put "changeset/:id" => "changeset#update", :id => /\d+/
+     put "changeset/:id/close" => "changeset#close", :id => /\d+/
+     get "changesets" => "changeset#query"
+     post "changeset/:id/comment" => "changeset#comment", :as => :changeset_comment, :id => /\d+/
+     post "changeset/comment/:id/hide" => "changeset#hide_comment", :as => :changeset_comment_hide, :id => /\d+/
+     post "changeset/comment/:id/unhide" => "changeset#unhide_comment", :as => :changeset_comment_unhide, :id => /\d+/
+     put "node/create" => "node#create"
+     get "node/:id/ways" => "way#ways_for_node", :id => /\d+/
+     get "node/:id/relations" => "relation#relations_for_node", :id => /\d+/
+     get "node/:id/history" => "old_node#history", :id => /\d+/
+     post "node/:id/:version/redact" => "old_node#redact", :version => /\d+/, :id => /\d+/
+     get "node/:id/:version" => "old_node#version", :id => /\d+/, :version => /\d+/
+     get "node/:id" => "node#read", :id => /\d+/
+     put "node/:id" => "node#update", :id => /\d+/
+     delete "node/:id" => "node#delete", :id => /\d+/
+     get "nodes" => "node#nodes"
+     put "way/create" => "way#create"
+     get "way/:id/history" => "old_way#history", :id => /\d+/
+     get "way/:id/full" => "way#full", :id => /\d+/
+     get "way/:id/relations" => "relation#relations_for_way", :id => /\d+/
+     post "way/:id/:version/redact" => "old_way#redact", :version => /\d+/, :id => /\d+/
+     get "way/:id/:version" => "old_way#version", :id => /\d+/, :version => /\d+/
+     get "way/:id" => "way#read", :id => /\d+/
+     put "way/:id" => "way#update", :id => /\d+/
+     delete "way/:id" => "way#delete", :id => /\d+/
+     get "ways" => "way#ways"
+     put "relation/create" => "relation#create"
+     get "relation/:id/relations" => "relation#relations_for_relation", :id => /\d+/
+     get "relation/:id/history" => "old_relation#history", :id => /\d+/
+     get "relation/:id/full" => "relation#full", :id => /\d+/
+     post "relation/:id/:version/redact" => "old_relation#redact", :version => /\d+/, :id => /\d+/
+     get "relation/:id/:version" => "old_relation#version", :id => /\d+/, :version => /\d+/
+     get "relation/:id" => "relation#read", :id => /\d+/
+     put "relation/:id" => "relation#update", :id => /\d+/
+     delete "relation/:id" => "relation#delete", :id => /\d+/
+     get "relations" => "relation#relations"
+     get "map" => "api#map"
+     get "trackpoints" => "api#trackpoints"
+     get "changes" => "api#changes"
+     get "search" => "search#search_all", :as => "api_search"
+     get "ways/search" => "search#search_ways"
+     get "relations/search" => "search#search_relations"
+     get "nodes/search" => "search#search_nodes"
+     get "user/:id" => "user#api_read", :id => /\d+/
+     get "user/details" => "user#api_details"
+     get "user/gpx_files" => "user#api_gpx_files"
+     get "user/preferences" => "user_preference#read"
+     get "user/preferences/:preference_key" => "user_preference#read_one"
+     put "user/preferences" => "user_preference#update"
+     put "user/preferences/:preference_key" => "user_preference#update_one"
+     delete "user/preferences/:preference_key" => "user_preference#delete_one"
+     post "gpx/create" => "trace#api_create"
+     get "gpx/:id" => "trace#api_read", :id => /\d+/
+     put "gpx/:id" => "trace#api_update", :id => /\d+/
+     delete "gpx/:id" => "trace#api_delete", :id => /\d+/
+     get "gpx/:id/details" => "trace#api_read", :id => /\d+/
+     get "gpx/:id/data" => "trace#api_data"
+     # AMF (ActionScript) API
+     post "amf/read" => "amf#amf_read"
+     post "amf/write" => "amf#amf_write"
+     get "swf/trackpoints" => "swf#trackpoints"
+     # Map notes API
      resources :notes, :except => [:new, :edit, :update], :constraints => { :id => /\d+/ }, :defaults => { :format => "xml" } do
        collection do
          get "search"
        end
      end
  
-     match "notes/addPOIexec" => "notes#create", :via => :post
-     match "notes/closePOIexec" => "notes#close", :via => :post
-     match "notes/editPOIexec" => "notes#comment", :via => :post
-     match "notes/getGPX" => "notes#index", :via => :get, :format => "gpx"
-     match "notes/getRSSfeed" => "notes#feed", :via => :get, :format => "rss"
+     post "notes/addPOIexec" => "notes#create"
+     post "notes/closePOIexec" => "notes#close"
+     post "notes/editPOIexec" => "notes#comment"
+     get "notes/getGPX" => "notes#index", :format => "gpx"
+     get "notes/getRSSfeed" => "notes#feed", :format => "rss"
    end
  
    # Data browsing
-   match "/way/:id" => "browse#way", :via => :get, :id => /\d+/, :as => :way
-   match "/way/:id/history" => "browse#way_history", :via => :get, :id => /\d+/
-   match "/node/:id" => "browse#node", :via => :get, :id => /\d+/, :as => :node
-   match "/node/:id/history" => "browse#node_history", :via => :get, :id => /\d+/
-   match "/relation/:id" => "browse#relation", :via => :get, :id => /\d+/, :as => :relation
-   match "/relation/:id/history" => "browse#relation_history", :via => :get, :id => /\d+/
-   match "/changeset/:id" => "browse#changeset", :via => :get, :as => :changeset, :id => /\d+/
-   match "/changeset/:id/comments/feed" => "changeset#comments_feed", :via => :get, :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => "rss" }
-   match "/note/:id" => "browse#note", :via => :get, :id => /\d+/, :as => "browse_note"
-   match "/note/new" => "browse#new_note", :via => :get
-   match "/user/:display_name/history" => "changeset#list", :via => :get
-   match "/user/:display_name/history/feed" => "changeset#feed", :via => :get, :defaults => { :format => :atom }
-   match "/user/:display_name/notes" => "notes#mine", :via => :get
-   match "/history/friends" => "changeset#list", :via => :get, :friends => true, :as => "friend_changesets", :defaults => { :format => :html }
-   match "/history/nearby" => "changeset#list", :via => :get, :nearby => true, :as => "nearby_changesets", :defaults => { :format => :html }
+   get "/way/:id" => "browse#way", :id => /\d+/, :as => :way
+   get "/way/:id/history" => "browse#way_history", :id => /\d+/
+   get "/node/:id" => "browse#node", :id => /\d+/, :as => :node
+   get "/node/:id/history" => "browse#node_history", :id => /\d+/
+   get "/relation/:id" => "browse#relation", :id => /\d+/, :as => :relation
+   get "/relation/:id/history" => "browse#relation_history", :id => /\d+/
+   get "/changeset/:id" => "browse#changeset", :as => :changeset, :id => /\d+/
+   get "/changeset/:id/comments/feed" => "changeset#comments_feed", :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => "rss" }
+   get "/note/:id" => "browse#note", :id => /\d+/, :as => "browse_note"
+   get "/note/new" => "browse#new_note"
+   get "/user/:display_name/history" => "changeset#list"
+   get "/user/:display_name/history/feed" => "changeset#feed", :defaults => { :format => :atom }
+   get "/user/:display_name/notes" => "notes#mine"
+   get "/history/friends" => "changeset#list", :friends => true, :as => "friend_changesets", :defaults => { :format => :html }
+   get "/history/nearby" => "changeset#list", :nearby => true, :as => "nearby_changesets", :defaults => { :format => :html }
  
    get "/browse/way/:id",                :to => redirect(:path => "/way/%{id}")
    get "/browse/way/:id/history",        :to => redirect(:path => "/way/%{id}/history")
  
    # web site
    root :to => "site#index", :via => [:get, :post]
-   match "/edit" => "site#edit", :via => :get, :as => :edit
-   match "/copyright/:copyright_locale" => "site#copyright", :via => :get
-   match "/copyright" => "site#copyright", :via => :get
-   match "/welcome" => "site#welcome", :via => :get, :as => :welcome
-   match "/fixthemap" => "site#fixthemap", :via => :get, :as => :fixthemap
-   match "/help" => "site#help", :via => :get, :as => :help
-   match "/about" => "site#about", :via => :get, :as => :about
-   match "/history" => "changeset#list", :via => :get
-   match "/history/feed" => "changeset#feed", :via => :get, :defaults => { :format => :atom }
-   match "/history/comments/feed" => "changeset#comments_feed", :via => :get, :as => :changesets_comments_feed, :defaults => { :format => "rss" }
-   match "/export" => "site#export", :via => :get
+   get "/edit" => "site#edit"
+   get "/copyright/:copyright_locale" => "site#copyright"
+   get "/copyright" => "site#copyright"
+   get "/welcome" => "site#welcome"
+   get "/fixthemap" => "site#fixthemap"
+   get "/help" => "site#help"
+   get "/about" => "site#about"
+   get "/history" => "changeset#list"
+   get "/history/feed" => "changeset#feed", :defaults => { :format => :atom }
+   get "/history/comments/feed" => "changeset#comments_feed", :as => :changesets_comments_feed, :defaults => { :format => "rss" }
+   get "/export" => "site#export"
    match "/login" => "user#login", :via => [:get, :post]
    match "/logout" => "user#logout", :via => [:get, :post]
-   match "/offline" => "site#offline", :via => :get
-   match "/key" => "site#key", :via => :get
-   match "/id" => "site#id", :via => :get
-   match "/query" => "browse#query", :via => :get
-   match "/user/new" => "user#new", :via => :get
-   match "/user/new" => "user#create", :via => :post
-   match "/user/terms" => "user#terms", :via => :get
-   match "/user/save" => "user#save", :via => :post
-   match "/user/:display_name/confirm/resend" => "user#confirm_resend", :via => :get
+   get "/offline" => "site#offline"
+   get "/key" => "site#key"
+   get "/id" => "site#id"
+   get "/query" => "browse#query"
+   get "/user/new" => "user#new"
+   post "/user/new" => "user#create"
+   get "/user/terms" => "user#terms"
+   post "/user/save" => "user#save"
+   get "/user/:display_name/confirm/resend" => "user#confirm_resend"
    match "/user/:display_name/confirm" => "user#confirm", :via => [:get, :post]
    match "/user/confirm" => "user#confirm", :via => [:get, :post]
    match "/user/confirm-email" => "user#confirm_email", :via => [:get, :post]
-   match "/user/go_public" => "user#go_public", :via => :post
+   post "/user/go_public" => "user#go_public"
    match "/user/reset-password" => "user#reset_password", :via => [:get, :post]
    match "/user/forgot-password" => "user#lost_password", :via => [:get, :post]
-   match "/user/suspended" => "user#suspended", :via => :get
+   get "/user/suspended" => "user#suspended"
  
    get "/index.html", :to => redirect(:path => "/")
    get "/create-account.html", :to => redirect(:path => "/user/new")
    get "/forgot-password.html", :to => redirect(:path => "/user/forgot-password")
  
    # omniauth
-   match "/auth/failure" => "user#auth_failure", :via => :get
+   get "/auth/failure" => "user#auth_failure"
    match "/auth/:provider/callback" => "user#auth_success", :via => [:get, :post], :as => :auth_success
    match "/auth/:provider" => "user#auth", :via => [:get, :post], :as => :auth
  
    # permalink
-   match "/go/:code" => "site#permalink", :via => :get, :code => /[a-zA-Z0-9_@~]+[=-]*/
+   get "/go/:code" => "site#permalink", :code => /[a-zA-Z0-9_@~]+[=-]*/
  
    # rich text preview
-   match "/preview/:type" => "site#preview", :via => :post, :as => :preview
+   post "/preview/:type" => "site#preview", :as => :preview
  
    # traces
-   match "/user/:display_name/traces/tag/:tag/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/
-   match "/user/:display_name/traces/tag/:tag" => "trace#list", :via => :get
-   match "/user/:display_name/traces/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/
-   match "/user/:display_name/traces" => "trace#list", :via => :get
-   match "/user/:display_name/traces/tag/:tag/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss }
-   match "/user/:display_name/traces/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss }
-   match "/user/:display_name/traces/:id" => "trace#view", :via => :get
-   match "/user/:display_name/traces/:id/picture" => "trace#picture", :via => :get
-   match "/user/:display_name/traces/:id/icon" => "trace#icon", :via => :get
-   match "/traces/tag/:tag/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/
-   match "/traces/tag/:tag" => "trace#list", :via => :get
-   match "/traces/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/
-   match "/traces" => "trace#list", :via => :get
-   match "/traces/tag/:tag/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss }
-   match "/traces/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss }
-   match "/traces/mine/tag/:tag/page/:page" => "trace#mine", :via => :get, :page => /[1-9][0-9]*/
-   match "/traces/mine/tag/:tag" => "trace#mine", :via => :get
-   match "/traces/mine/page/:page" => "trace#mine", :via => :get
-   match "/traces/mine" => "trace#mine", :via => :get
+   get "/user/:display_name/traces/tag/:tag/page/:page" => "trace#list", :page => /[1-9][0-9]*/
+   get "/user/:display_name/traces/tag/:tag" => "trace#list"
+   get "/user/:display_name/traces/page/:page" => "trace#list", :page => /[1-9][0-9]*/
+   get "/user/:display_name/traces" => "trace#list"
+   get "/user/:display_name/traces/tag/:tag/rss" => "trace#georss", :defaults => { :format => :rss }
+   get "/user/:display_name/traces/rss" => "trace#georss", :defaults => { :format => :rss }
+   get "/user/:display_name/traces/:id" => "trace#view"
+   get "/user/:display_name/traces/:id/picture" => "trace#picture"
+   get "/user/:display_name/traces/:id/icon" => "trace#icon"
+   get "/traces/tag/:tag/page/:page" => "trace#list", :page => /[1-9][0-9]*/
+   get "/traces/tag/:tag" => "trace#list"
+   get "/traces/page/:page" => "trace#list", :page => /[1-9][0-9]*/
+   get "/traces" => "trace#list"
+   get "/traces/tag/:tag/rss" => "trace#georss", :defaults => { :format => :rss }
+   get "/traces/rss" => "trace#georss", :defaults => { :format => :rss }
+   get "/traces/mine/tag/:tag/page/:page" => "trace#mine", :page => /[1-9][0-9]*/
+   get "/traces/mine/tag/:tag" => "trace#mine"
+   get "/traces/mine/page/:page" => "trace#mine"
+   get "/traces/mine" => "trace#mine"
    match "/trace/create" => "trace#create", :via => [:get, :post]
-   match "/trace/:id/data" => "trace#data", :via => :get, :id => /\d+/, :as => "trace_data"
+   get "/trace/:id/data" => "trace#data", :id => /\d+/, :as => "trace_data"
    match "/trace/:id/edit" => "trace#edit", :via => [:get, :post], :id => /\d+/, :as => "trace_edit"
-   match "/trace/:id/delete" => "trace#delete", :via => :post, :id => /\d+/
+   post "/trace/:id/delete" => "trace#delete", :id => /\d+/
  
    # diary pages
    match "/diary/new" => "diary_entry#new", :via => [:get, :post]
-   match "/diary/friends" => "diary_entry#list", :friends => true, :via => :get, :as => "friend_diaries"
-   match "/diary/nearby" => "diary_entry#list", :nearby => true, :via => :get, :as => "nearby_diaries"
-   match "/user/:display_name/diary/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss }
-   match "/diary/:language/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss }
-   match "/diary/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss }
-   match "/user/:display_name/diary/comments/:page" => "diary_entry#comments", :via => :get, :page => /[1-9][0-9]*/
-   match "/user/:display_name/diary/comments/" => "diary_entry#comments", :via => :get
-   match "/user/:display_name/diary" => "diary_entry#list", :via => :get
-   match "/diary/:language" => "diary_entry#list", :via => :get
-   match "/diary" => "diary_entry#list", :via => :get
-   match "/user/:display_name/diary/:id" => "diary_entry#view", :via => :get, :id => /\d+/, :as => :diary_entry
-   match "/user/:display_name/diary/:id/newcomment" => "diary_entry#comment", :via => :post, :id => /\d+/
+   get "/diary/friends" => "diary_entry#list", :friends => true, :as => "friend_diaries"
+   get "/diary/nearby" => "diary_entry#list", :nearby => true, :as => "nearby_diaries"
+   get "/user/:display_name/diary/rss" => "diary_entry#rss", :defaults => { :format => :rss }
+   get "/diary/:language/rss" => "diary_entry#rss", :defaults => { :format => :rss }
+   get "/diary/rss" => "diary_entry#rss", :defaults => { :format => :rss }
+   get "/user/:display_name/diary/comments/:page" => "diary_entry#comments", :page => /[1-9][0-9]*/
+   get "/user/:display_name/diary/comments/" => "diary_entry#comments"
+   get "/user/:display_name/diary" => "diary_entry#list"
+   get "/diary/:language" => "diary_entry#list"
+   get "/diary" => "diary_entry#list"
 -  get "/user/:display_name/diary/:id" => "diary_entry#view", :id => /\d+/
++  get "/user/:display_name/diary/:id" => "diary_entry#view", :id => /\d+/, :as => :diary_entry
+   post "/user/:display_name/diary/:id/newcomment" => "diary_entry#comment", :id => /\d+/
    match "/user/:display_name/diary/:id/edit" => "diary_entry#edit", :via => [:get, :post], :id => /\d+/
-   match "/user/:display_name/diary/:id/hide" => "diary_entry#hide", :via => :post, :id => /\d+/, :as => :hide_diary_entry
-   match "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entry#hidecomment", :via => :post, :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment
-   match "/user/:display_name/diary/:id/subscribe" => "diary_entry#subscribe", :via => :post, :as => :diary_entry_subscribe, :id => /\d+/
-   match "/user/:display_name/diary/:id/unsubscribe" => "diary_entry#unsubscribe", :via => :post, :as => :diary_entry_unsubscribe, :id => /\d+/
+   post "/user/:display_name/diary/:id/hide" => "diary_entry#hide", :id => /\d+/, :as => :hide_diary_entry
+   post "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entry#hidecomment", :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment
+   post "/user/:display_name/diary/:id/subscribe" => "diary_entry#subscribe", :as => :diary_entry_subscribe, :id => /\d+/
+   post "/user/:display_name/diary/:id/unsubscribe" => "diary_entry#unsubscribe", :as => :diary_entry_unsubscribe, :id => /\d+/
  
    # user pages
-   match "/user/:display_name" => "user#view", :via => :get, :as => "user"
+   get "/user/:display_name" => "user#view", :as => "user"
    match "/user/:display_name/make_friend" => "user#make_friend", :via => [:get, :post], :as => "make_friend"
    match "/user/:display_name/remove_friend" => "user#remove_friend", :via => [:get, :post], :as => "remove_friend"
    match "/user/:display_name/account" => "user#account", :via => [:get, :post]
-   match "/user/:display_name/set_status" => "user#set_status", :via => :get, :as => :set_status_user
-   match "/user/:display_name/delete" => "user#delete", :via => :get, :as => :delete_user
+   get "/user/:display_name/set_status" => "user#set_status", :as => :set_status_user
+   get "/user/:display_name/delete" => "user#delete", :as => :delete_user
  
    # user lists
    match "/users" => "user#list", :via => [:get, :post]
    match "/users/:status" => "user#list", :via => [:get, :post]
  
    # geocoder
-   match "/search" => "geocoder#search", :via => :get, :as => :search
-   match "/geocoder/search_latlon" => "geocoder#search_latlon", :via => :get
-   match "/geocoder/search_ca_postcode" => "geocoder#search_ca_postcode", :via => :get
-   match "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim", :via => :get
-   match "/geocoder/search_geonames" => "geocoder#search_geonames", :via => :get
-   match "/geocoder/search_osm_nominatim_reverse" => "geocoder#search_osm_nominatim_reverse", :via => :get
-   match "/geocoder/search_geonames_reverse" => "geocoder#search_geonames_reverse", :via => :get
+   get "/search" => "geocoder#search"
+   get "/geocoder/search_latlon" => "geocoder#search_latlon"
+   get "/geocoder/search_ca_postcode" => "geocoder#search_ca_postcode"
+   get "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim"
+   get "/geocoder/search_geonames" => "geocoder#search_geonames"
+   get "/geocoder/search_osm_nominatim_reverse" => "geocoder#search_osm_nominatim_reverse"
+   get "/geocoder/search_geonames_reverse" => "geocoder#search_geonames_reverse"
  
    # directions
-   match "/directions" => "directions#search", :via => :get, :as => :directions
+   get "/directions" => "directions#search"
  
    # export
-   match "/export/finish" => "export#finish", :via => :post
-   match "/export/embed" => "export#embed", :via => :get
+   post "/export/finish" => "export#finish"
+   get "/export/embed" => "export#embed"
  
    # messages
-   match "/user/:display_name/inbox" => "message#inbox", :via => :get, :as => "inbox"
-   match "/user/:display_name/outbox" => "message#outbox", :via => :get, :as => "outbox"
+   get "/user/:display_name/inbox" => "message#inbox", :as => "inbox"
+   get "/user/:display_name/outbox" => "message#outbox", :as => "outbox"
    match "/message/new/:display_name" => "message#new", :via => [:get, :post], :as => "new_message"
-   match "/message/read/:message_id" => "message#read", :via => :get, :as => "read_message"
-   match "/message/mark/:message_id" => "message#mark", :via => :post, :as => "mark_message"
+   get "/message/read/:message_id" => "message#read", :as => "read_message"
+   post "/message/mark/:message_id" => "message#mark", :as => "mark_message"
    match "/message/reply/:message_id" => "message#reply", :via => [:get, :post], :as => "reply_message"
-   match "/message/delete/:message_id" => "message#delete", :via => :post, :as => "delete_message"
+   post "/message/delete/:message_id" => "message#delete", :as => "delete_message"
  
    # oauth admin pages (i.e: for setting up new clients, etc...)
    scope "/user/:display_name" do
    end
    match "/oauth/revoke" => "oauth#revoke", :via => [:get, :post]
    match "/oauth/authorize" => "oauth#authorize", :via => [:get, :post], :as => :authorize
-   match "/oauth/token" => "oauth#token", :via => :get, :as => :token
+   get "/oauth/token" => "oauth#token", :as => :token
    match "/oauth/request_token" => "oauth#request_token", :via => [:get, :post], :as => :request_token
    match "/oauth/access_token" => "oauth#access_token", :via => [:get, :post], :as => :access_token
-   match "/oauth/test_request" => "oauth#test_request", :via => :get, :as => :test_request
+   get "/oauth/test_request" => "oauth#test_request", :as => :test_request
  
    # roles and banning pages
-   match "/user/:display_name/role/:role/grant" => "user_roles#grant", :via => :post, :as => "grant_role"
-   match "/user/:display_name/role/:role/revoke" => "user_roles#revoke", :via => :post, :as => "revoke_role"
-   match "/user/:display_name/blocks" => "user_blocks#blocks_on", :via => :get
-   match "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :via => :get
-   match "/blocks/new/:display_name" => "user_blocks#new", :via => :get, :as => "new_user_block"
+   post "/user/:display_name/role/:role/grant" => "user_roles#grant", :as => "grant_role"
+   post "/user/:display_name/role/:role/revoke" => "user_roles#revoke", :as => "revoke_role"
+   get "/user/:display_name/blocks" => "user_blocks#blocks_on"
+   get "/user/:display_name/blocks_by" => "user_blocks#blocks_by"
+   get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block"
    resources :user_blocks
    match "/blocks/:id/revoke" => "user_blocks#revoke", :via => [:get, :post], :as => "revoke_user_block"
  
 +  # issues and reports
 +  resources :issues do
 +    resources :comments, :controller => :issue_comments
 +    member do
 +      post "resolve"
 +      post "assign"
 +      post "ignore"
 +      post "reopen"
 +    end
 +  end
 +
 +  resources :reports
 +
    # redactions
    resources :redactions
  end
diff --combined db/structure.sql
index 73cb543e7688c3133825caf98232bfd4ed3ff34d,8803c0c02a41088209668ab15854a679a44332e0..077faffad1faef8125de386aadd5add0675bb16b
@@@ -1,12 -1,6 +1,6 @@@
- --
- -- PostgreSQL database dump
- --
- -- Dumped from database version 9.5.7
- -- Dumped by pg_dump version 9.5.7
  SET statement_timeout = 0;
  SET lock_timeout = 0;
+ SET idle_in_transaction_session_timeout = 0;
  SET client_encoding = 'UTF8';
  SET standard_conforming_strings = on;
  SET check_function_bodies = false;
@@@ -66,17 -60,6 +60,17 @@@ CREATE TYPE gpx_visibility_enum AS ENU
  );
  
  
 +--
 +-- Name: issue_status_enum; Type: TYPE; Schema: public; Owner: -
 +--
 +
 +CREATE TYPE issue_status_enum AS ENUM (
 +    'open',
 +    'ignored',
 +    'resolved'
 +);
 +
 +
  --
  -- Name: note_event_enum; Type: TYPE; Schema: public; Owner: -
  --
@@@ -696,78 -679,6 +690,78 @@@ CREATE SEQUENCE gpx_files_id_se
  ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
  
  
 +--
 +-- Name: issue_comments; Type: TABLE; Schema: public; Owner: -
 +--
 +
 +CREATE TABLE issue_comments (
 +    id integer NOT NULL,
 +    issue_id integer NOT NULL,
 +    user_id integer NOT NULL,
 +    body text NOT NULL,
 +    created_at timestamp without time zone NOT NULL,
 +    updated_at timestamp without time zone NOT NULL
 +);
 +
 +
 +--
 +-- Name: issue_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 +--
 +
 +CREATE SEQUENCE issue_comments_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +--
 +-- Name: issue_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 +--
 +
 +ALTER SEQUENCE issue_comments_id_seq OWNED BY issue_comments.id;
 +
 +
 +--
 +-- Name: issues; Type: TABLE; Schema: public; Owner: -
 +--
 +
 +CREATE TABLE issues (
 +    id integer NOT NULL,
 +    reportable_type character varying NOT NULL,
 +    reportable_id integer NOT NULL,
 +    reported_user_id integer,
 +    status issue_status_enum DEFAULT 'open'::public.issue_status_enum NOT NULL,
 +    assigned_role user_role_enum NOT NULL,
 +    resolved_at timestamp without time zone,
 +    resolved_by integer,
 +    updated_by integer,
 +    reports_count integer DEFAULT 0,
 +    created_at timestamp without time zone NOT NULL,
 +    updated_at timestamp without time zone NOT NULL
 +);
 +
 +
 +--
 +-- Name: issues_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 +--
 +
 +CREATE SEQUENCE issues_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +--
 +-- Name: issues_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 +--
 +
 +ALTER SEQUENCE issues_id_seq OWNED BY issues.id;
 +
 +
  --
  -- Name: languages; Type: TABLE; Schema: public; Owner: -
  --
@@@ -1069,40 -980,6 +1063,40 @@@ CREATE TABLE relations 
  );
  
  
 +--
 +-- Name: reports; Type: TABLE; Schema: public; Owner: -
 +--
 +
 +CREATE TABLE reports (
 +    id integer NOT NULL,
 +    issue_id integer NOT NULL,
 +    user_id integer NOT NULL,
 +    details text NOT NULL,
 +    category character varying NOT NULL,
 +    created_at timestamp without time zone NOT NULL,
 +    updated_at timestamp without time zone NOT NULL
 +);
 +
 +
 +--
 +-- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 +--
 +
 +CREATE SEQUENCE reports_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +--
 +-- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 +--
 +
 +ALTER SEQUENCE reports_id_seq OWNED BY reports.id;
 +
 +
  --
  -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
  --
@@@ -1260,7 -1137,8 +1254,8 @@@ CREATE TABLE users 
      diary_entries_count integer DEFAULT 0 NOT NULL,
      image_use_gravatar boolean DEFAULT false NOT NULL,
      image_content_type character varying(255),
-     auth_provider character varying
+     auth_provider character varying(255),
+     home_tile bigint
  );
  
  
@@@ -1322,182 -1200,161 +1317,182 @@@ CREATE TABLE ways 
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: acls id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: changeset_comments id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: changesets id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changesets ALTER COLUMN id SET DEFAULT nextval('changesets_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: client_applications id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY client_applications ALTER COLUMN id SET DEFAULT nextval('client_applications_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: current_nodes id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_nodes ALTER COLUMN id SET DEFAULT nextval('current_nodes_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: current_relations id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_relations_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: current_ways id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: diary_comments id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_comments ALTER COLUMN id SET DEFAULT nextval('diary_comments_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: diary_entries id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entries ALTER COLUMN id SET DEFAULT nextval('diary_entries_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: friends id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY friends ALTER COLUMN id SET DEFAULT nextval('friends_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: gpx_file_tags id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tags_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: gpx_files id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: messages id; Type: DEFAULT; Schema: public; Owner: -
  --
  
 +ALTER TABLE ONLY issue_comments ALTER COLUMN id SET DEFAULT nextval('issue_comments_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: -
 +--
 +
  ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: note_comments id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY note_comments ALTER COLUMN id SET DEFAULT nextval('note_comments_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: notes id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: oauth_nonces id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: oauth_tokens id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: redactions id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: user_blocks id; Type: DEFAULT; Schema: public; Owner: -
  --
  
 +ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: -
 +--
 +
  ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: user_roles id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: user_tokens id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_tokens ALTER COLUMN id SET DEFAULT nextval('user_tokens_id_seq'::regclass);
  
  
  --
- -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
  
  
  --
- -- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: acls acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY acls
  
  
  --
- -- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY ar_internal_metadata
  
  
  --
- -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: changeset_comments changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changeset_comments
  
  
  --
- -- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: changesets changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changesets
  
  
  --
- -- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: client_applications client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY client_applications
  
  
  --
- -- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_node_tags current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_node_tags
  
  
  --
- -- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_nodes current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_nodes
  
  
  --
- -- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relation_members current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relation_members
  
  
  --
- -- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relation_tags current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relation_tags
  
  
  --
- -- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relations current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relations
  
  
  --
- -- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_way_nodes current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_way_nodes
  
  
  --
- -- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_way_tags current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_way_tags
  
  
  --
- -- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_ways current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_ways
  
  
  --
- -- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_comments diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_comments
  
  
  --
- -- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entries diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entries
  
  
  --
- -- Name: diary_entry_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entry_subscriptions diary_entry_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entry_subscriptions
  
  
  --
- -- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: friends friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY friends
  
  
  --
- -- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: gpx_file_tags gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_file_tags
  
  
  --
- -- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: gpx_files gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_files
      ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
  
  
 +--
 +-- Name: issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issue_comments
 +    ADD CONSTRAINT issue_comments_pkey PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issues
 +    ADD CONSTRAINT issues_pkey PRIMARY KEY (id);
 +
 +
  --
- -- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: languages languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY languages
  
  
  --
- -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY messages
  
  
  --
- -- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: node_tags node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY node_tags
  
  
  --
- -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY nodes
  
  
  --
- -- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: note_comments note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY note_comments
  
  
  --
- -- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: notes notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY notes
  
  
  --
- -- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: oauth_nonces oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_nonces
  
  
  --
- -- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: oauth_tokens oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_tokens
  
  
  --
- -- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: redactions redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY redactions
  
  
  --
- -- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: relation_members relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relation_members
  
  
  --
- -- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: relation_tags relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relation_tags
  
  
  --
- -- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: relations relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relations
      ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
  
  
 +--
 +-- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY reports
 +    ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
 +
 +
  --
- -- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_blocks user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_blocks
  
  
  --
- -- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_preferences user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_preferences
  
  
  --
- -- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_roles user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_roles
  
  
  --
- -- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_tokens user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_tokens
  
  
  --
- -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY users
  
  
  --
- -- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: way_nodes way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY way_nodes
  
  
  --
- -- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: way_tags way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY way_tags
  
  
  --
- -- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+ -- Name: ways ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY ways
@@@ -2042,41 -1875,6 +2037,41 @@@ CREATE INDEX index_client_applications_
  CREATE INDEX index_diary_entry_subscriptions_on_diary_entry_id ON diary_entry_subscriptions USING btree (diary_entry_id);
  
  
 +--
 +-- Name: index_issue_comments_on_issue_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_issue_comments_on_issue_id ON issue_comments USING btree (issue_id);
 +
 +
 +--
 +-- Name: index_issue_comments_on_user_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_issue_comments_on_user_id ON issue_comments USING btree (user_id);
 +
 +
 +--
 +-- Name: index_issues_on_reportable_type_and_reportable_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_issues_on_reportable_type_and_reportable_id ON issues USING btree (reportable_type, reportable_id);
 +
 +
 +--
 +-- Name: index_issues_on_reported_user_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_issues_on_reported_user_id ON issues USING btree (reported_user_id);
 +
 +
 +--
 +-- Name: index_issues_on_updated_by; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_issues_on_updated_by ON issues USING btree (updated_by);
 +
 +
  --
  -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -
  --
@@@ -2112,20 -1910,6 +2107,20 @@@ CREATE UNIQUE INDEX index_oauth_tokens_
  CREATE INDEX index_oauth_tokens_on_user_id ON oauth_tokens USING btree (user_id);
  
  
 +--
 +-- Name: index_reports_on_issue_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_reports_on_issue_id ON reports USING btree (issue_id);
 +
 +
 +--
 +-- Name: index_reports_on_user_id; Type: INDEX; Schema: public; Owner: -
 +--
 +
 +CREATE INDEX index_reports_on_user_id ON reports USING btree (user_id);
 +
 +
  --
  -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
@@@ -2301,6 -2085,13 +2296,13 @@@ CREATE UNIQUE INDEX users_email_idx ON 
  CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text));
  
  
+ --
+ -- Name: users_home_idx; Type: INDEX; Schema: public; Owner: -
+ --
+ CREATE INDEX users_home_idx ON users USING btree (home_tile);
  --
  -- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -
  --
@@@ -2323,7 -2114,7 +2325,7 @@@ CREATE INDEX ways_timestamp_idx ON way
  
  
  --
- -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changeset_comments changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changeset_comments
  
  
  --
- -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changeset_comments changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changeset_comments
  
  
  --
- -- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changeset_tags changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changeset_tags
  
  
  --
- -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changesets_subscribers changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changesets_subscribers
  
  
  --
- -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changesets_subscribers changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changesets_subscribers
  
  
  --
- -- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: changesets changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY changesets
  
  
  --
- -- Name: client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: client_applications client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY client_applications
  
  
  --
- -- Name: current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_node_tags current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_node_tags
  
  
  --
- -- Name: current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_nodes current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_nodes
  
  
  --
- -- Name: current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relation_members current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relation_members
  
  
  --
- -- Name: current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relation_tags current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relation_tags
  
  
  --
- -- Name: current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_relations current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_relations
  
  
  --
- -- Name: current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_way_nodes current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_way_nodes
  
  
  --
- -- Name: current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_way_nodes current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_way_nodes
  
  
  --
- -- Name: current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_way_tags current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_way_tags
  
  
  --
- -- Name: current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: current_ways current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY current_ways
  
  
  --
- -- Name: diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_comments diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_comments
  
  
  --
- -- Name: diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_comments diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_comments
  
  
  --
- -- Name: diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entries diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entries
  
  
  --
- -- Name: diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entries diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entries
  
  
  --
- -- Name: diary_entry_subscriptions_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entry_subscriptions diary_entry_subscriptions_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entry_subscriptions
  
  
  --
- -- Name: diary_entry_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: diary_entry_subscriptions diary_entry_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY diary_entry_subscriptions
  
  
  --
- -- Name: friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: friends friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY friends
  
  
  --
- -- Name: friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: friends friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY friends
  
  
  --
- -- Name: gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: gps_points gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gps_points
  
  
  --
- -- Name: gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: gpx_file_tags gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_file_tags
  
  
  --
- -- Name: gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: gpx_files gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY gpx_files
      ADD CONSTRAINT gpx_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
  
  
 +--
 +-- Name: issue_comments_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issue_comments
 +    ADD CONSTRAINT issue_comments_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
 +
 +
 +--
 +-- Name: issue_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issue_comments
 +    ADD CONSTRAINT issue_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
 +
 +
 +--
 +-- Name: issues_reported_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issues
 +    ADD CONSTRAINT issues_reported_user_id_fkey FOREIGN KEY (reported_user_id) REFERENCES users(id);
 +
 +
 +--
 +-- Name: issues_resolved_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issues
 +    ADD CONSTRAINT issues_resolved_by_fkey FOREIGN KEY (resolved_by) REFERENCES users(id);
 +
 +
 +--
 +-- Name: issues_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY issues
 +    ADD CONSTRAINT issues_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES users(id);
 +
 +
  --
- -- Name: messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: messages messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY messages
  
  
  --
- -- Name: messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: messages messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY messages
  
  
  --
- -- Name: node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: node_tags node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY node_tags
  
  
  --
- -- Name: nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: nodes nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY nodes
  
  
  --
- -- Name: nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: nodes nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY nodes
  
  
  --
- -- Name: note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: note_comments note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY note_comments
  
  
  --
- -- Name: note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: note_comments note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY note_comments
  
  
  --
- -- Name: oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: oauth_tokens oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_tokens
  
  
  --
- -- Name: oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: oauth_tokens oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY oauth_tokens
  
  
  --
- -- Name: redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: redactions redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY redactions
  
  
  --
- -- Name: relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: relation_members relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relation_members
  
  
  --
- -- Name: relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: relation_tags relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relation_tags
  
  
  --
- -- Name: relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: relations relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relations
  
  
  --
- -- Name: relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: relations relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY relations
      ADD CONSTRAINT relations_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
  
  
 +--
 +-- Name: reports_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY reports
 +    ADD CONSTRAINT reports_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
 +
 +
 +--
 +-- Name: reports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 +--
 +
 +ALTER TABLE ONLY reports
 +    ADD CONSTRAINT reports_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
 +
 +
  --
- -- Name: user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_blocks user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_blocks
  
  
  --
- -- Name: user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_blocks user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_blocks
  
  
  --
- -- Name: user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_blocks user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_blocks
  
  
  --
- -- Name: user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_preferences user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_preferences
  
  
  --
- -- Name: user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_roles user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_roles
  
  
  --
- -- Name: user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_roles user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_roles
  
  
  --
- -- Name: user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: user_tokens user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY user_tokens
  
  
  --
- -- Name: way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: way_nodes way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY way_nodes
  
  
  --
- -- Name: way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: way_tags way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY way_tags
  
  
  --
- -- Name: ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: ways ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY ways
  
  
  --
- -- Name: ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ -- Name: ways ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY ways
@@@ -2849,10 -2584,10 +2851,11 @@@ INSERT INTO "schema_migrations" (versio
  ('20150111192335'),
  ('20150222101847'),
  ('20150818224516'),
 +('20160822153055'),
  ('20161002153425'),
  ('20161011010929'),
  ('20170222134109'),
+ ('20180204153242'),
  ('21'),
  ('22'),
  ('23'),
  ('7'),
  ('8'),
  ('9');
--
--
diff --combined test/test_helper.rb
index 95d48bd5c7f2ed0485173106b043378d61f98abe,385a2f6825d0d9ea27baae625791d3b6a55e5067..7198519a75f4829c88e36da2add6de413a2aa6f0
@@@ -2,7 -2,7 +2,7 @@@ require "coveralls
  Coveralls.wear!("rails")
  
  ENV["RAILS_ENV"] = "test"
- require File.expand_path("../../config/environment", __FILE__)
+ require File.expand_path("../config/environment", __dir__)
  require "rails/test_help"
  require "webmock/minitest"
  
@@@ -150,13 -150,5 +150,13 @@@ module ActiveSuppor
          end
        end
      end
 +
 +    def sign_in_as(user)
 +      stub_hostip_requests
 +      visit login_path
 +      fill_in "username", :with => user.email
 +      fill_in "password", :with => "test"
 +      click_on "Login", :match => :first
 +    end
    end
  end