Project

General

Profile

« Previous | Next » 

Revision b75e1935

Added by Pierre-Louis Bonicoli almost 13 years ago

  • ID b75e193597dedcaa88f74a1d92dd35bb3adfcf1b

really use human_names

View differences:

lib/rails_fixes.rb
21 21
    end
22 22
  end
23 23
end
24

  
25
class ActiveRecord::Base
26
  def human_name
27
    self.class.human_name
28
  end
29

  
30
  def self.human_name(options={})
31
    ::ActiveRecord::Base.human_attribute_table_name_for_error(self.to_s.underscore)
32
  end
33
end
34

  

Also available in: Unified diff