Module: Cashboard::Behaviors::ListsLineItems
Overview
Standard interface to list associated LineItems for Projects and Estimates
Instance Method Summary collapse
-
#custom_items ⇒ Object
LineItems of type ‘custom’.
-
#line_items(options = {}) ⇒ Object
Returns all associated LineItems regardless of type.
-
#products ⇒ Object
LineItems of type ‘product’.
-
#tasks ⇒ Object
LineItems of type ‘task’.
Instance Method Details
#custom_items ⇒ Object
LineItems of type ‘custom’
22 23 24 |
# File 'lib/cashboard/behaviors/lists_line_items.rb', line 22 def custom_items self.filter_line_items_by :custom end |
#line_items(options = {}) ⇒ Object
Returns all associated LineItems regardless of type
5 6 7 8 9 |
# File 'lib/cashboard/behaviors/lists_line_items.rb', line 5 def line_items(={}) self.class.get_collection( self.links[:line_items], Cashboard::LineItem, ) end |
#products ⇒ Object
LineItems of type ‘product’
17 18 19 |
# File 'lib/cashboard/behaviors/lists_line_items.rb', line 17 def products self.filter_line_items_by :product end |
#tasks ⇒ Object
LineItems of type ‘task’
12 13 14 |
# File 'lib/cashboard/behaviors/lists_line_items.rb', line 12 def tasks self.filter_line_items_by :task end |