debiancdn

AWS, Content Delivery Network and Debian

日別アーカイブ: 2009/04/13

ActiveScaffoldがなんかバグバグになってきていてですね..

研究とか某所で便利に使っていたActiveScaffoldだが,どうもrailsのversionがあがるにつれて,ついていくのが苦しくなったのか,たんに自分が追えていないのか,バグふみの率が上昇している.これはまずいなあ.

というわけではまっていた

ActiveScaffold :: Describing Records: to_label

Describing Records: to_label

When ActiveScaffold needs to present a string description of a record, it searches through a common list of record properties looking for something that responds. The search set, in order, is: :to_label, :name, :label, :title, and finally :to_s. So if your schema already has one of those fields, it’ll be automatically used. But you can always define a to_label method to customize the string description.