Module: Rtt::QueryBuilder
- Included in:
- Rtt
- Defined in:
- lib/rtt/query_builder.rb
Instance Method Summary collapse
-
#query(options = {}) ⇒ Object
Query among all tasks filtering based on parameters.
Instance Method Details
#query(options = {}) ⇒ Object
Query among all tasks filtering based on parameters.
7 8 9 10 11 12 |
# File 'lib/rtt/query_builder.rb', line 7 def query = {} relation = Task.where(rtt_build_conditions()) relation = relation.where(table[:date].gt(.delete(:from))) if [:from] relation = relation.where(table[:date].lt(.delete(:to))) if [:to] relation end |