Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ActiveRecord
- class Base
- def self.translate_field data
- @data = data
- module_eval <<-"end;"
- def self.human_attribute_name(attr)
- "Pole <b>" + (@data[attr.to_sym] || 'Przetlumacz ' + attr) + "</b>"
- end
- end;
- end
- end
- end
- ### W modelu:
- translate_field :cash_register_type_id => 'Typ kasy',
- :serial => 'Numer seryjny'
Add Comment
Please, Sign In to add comment