search for: en_description

Displaying 1 result from an estimated 1 matches for "en_description".

Did you mean: _description
2005 Dec 18
0
Extending AR::B to provide translations
...to support and display different language versions of objects. I know of and have tried Globalize but still want to do this on my own for a multitude of reasons (the educational value probably being most important). My table for the objects has columns named like en_name, de_name, fr_name, en_description, de_description, fr_description and so on. I plan to write method_missing for AR::B like this: class AR::B def method_missing(method_name) self.send((current_lang + method_name.to_s).to_sym) end end so that when I call obj.name it will return de_name or en_name or whatever based on...