Ron Lusk on 6 Dec 2005 18:16:23 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] list_for class method

If you have a Rails application where ParentModel has many MiddleModel 's, and a MiddleModel has many ChildModel 's, you may want to look at my list_for class method, published on my blog.  Invoked in your MiddleModelsController as

  list_for :parent_model, 'some_column ASC, other_column DESC'

it will generate a list_for_parent_model method.  See the description and code.

Ron Lusk
talk mailing list