search for: ordersdecor

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

2006 Mar 07
1
decorators for models?
...(fields like @scaffold_fields, @scaffold_*) isn''t the right choice, as these parameters have more to do with "visual model" than with data model, so I was thinking of creating app/decorators/ and putting these visual models into separate classes (decorators) there i.e. class OrdersDecorator < ActiveRecord::Decorator The base class (AR::Decorator), each decorator would becom instance variable @model, which could be used to refer to original model, and this could happen automagically depending on the class name. There would be some default functions, like field_title that wou...