]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/language.rb
Make the "map" link on the traces page translatable.
[rails.git] / app / models / language.rb
index 8965cf4532a141b2a514f53a729df2f2d6ad8303..a33c76081c786ae594fe86cffea721da6406e812 100644 (file)
@@ -1,6 +1,11 @@
 class Language < ActiveRecord::Base
   set_primary_key :code
 
-  has_many :users, :foreign_key => 'locale'
   has_many :diary_entries, :foreign_key => 'language'
+
+  def name
+    name = english_name
+    name += " (#{native_name})" unless native_name.nil?
+    name
+  end  
 end