from a coding point of view tablename=request.controller rows = db(db[tablename]).select() return dict(rows=rows)
but the problem is that you have two controllers. Perhaps you should have only one. On Jan 18, 2:59 pm, walter <wdv...@gmail.com> wrote: > I have two controllers which differ only a database table title. For > example: > > default/persons/index > persons = db(db.person).select() > return dict(persons=persons) > > default/trips/index > trips = db(db.trip).select() > return dict(trips=trips) > > How implement DRY conception in this case? I think I need create an > additional class and pass a table name to this class. All work must to > be done in this class and a result should return to the corresponding > method. But it only my opinion. How to do it right?