Class | ActiveRecord::ConnectionAdapters::Column |
In: |
lib/features/localized_column_human_name.rb
|
Parent: | Object |
human_name | -> | human_name_without_localization |
model_class | [RW] |
Overwrites the human_name method to call human_attribute_name on the model_class if possible. Falls back to default behaviour if no model class is set (original method renamed to human_name_without_localization).
# File lib/features/localized_column_human_name.rb, line 42 42: def human_name 43: self.model_class ? self.model_class.human_attribute_name(@name) : human_name_without_localization 44: end