liquid_feedback_frontend
annotate model/unit.lua @ 278:fecd4c13054a
Code/css clean up and minor enhancements
author | bsw |
---|---|
date | Mon Feb 13 01:53:41 2012 +0100 (2012-02-13) |
parents | 6725c13b6ce0 |
children | b77e6a17ca77 |
rev | line source |
---|---|
bsw@241 | 1 Unit = mondelefant.new_class() |
bsw@241 | 2 Unit.table = 'unit' |
bsw@241 | 3 |
bsw@241 | 4 Unit:add_reference{ |
bsw@241 | 5 mode = '1m', |
bsw@241 | 6 to = "Area", |
bsw@241 | 7 this_key = 'id', |
bsw@241 | 8 that_key = 'unit_id', |
bsw@241 | 9 ref = 'areas', |
bsw@241 | 10 back_ref = 'unit' |
bsw@241 | 11 } |
bsw@241 | 12 |
bsw@241 | 13 function Unit:get_flattened_tree() |
bsw@241 | 14 -- TODO implement |
bsw@241 | 15 |
bsw@241 | 16 return Unit:new_selector():exec() |
bsw@241 | 17 end |