Improve user page navigation menu

Add counts to edits, blocks, and traces; don't show blocks if there
are none; and move OAuth to the settings page.
This commit is contained in:
Tom MacWright 2012-08-07 14:35:17 -04:00 committed by Tom Hughes
parent 378dd2222c
commit 221ca3c1fa
7 changed files with 56 additions and 30 deletions

View file

@ -1,7 +1,7 @@
class Changeset < ActiveRecord::Base
require 'xml/libxml'
belongs_to :user
belongs_to :user, :counter_cache => true
has_many :changeset_tags

View file

@ -1,7 +1,7 @@
class Trace < ActiveRecord::Base
self.table_name = "gpx_files"
belongs_to :user
belongs_to :user, :counter_cache => true
has_many :tags, :class_name => 'Tracetag', :foreign_key => 'gpx_id', :dependent => :delete_all
has_many :points, :class_name => 'Tracepoint', :foreign_key => 'gpx_id', :dependent => :delete_all