Module: Shared
- Included in:
- ByStar::ClassMethods
- Defined in:
- lib/by_star/shared.rb
Instance Method Summary collapse
Instance Method Details
#conditions_for_range(start_time, end_time, field = nil) ⇒ Object
2 3 4 5 6 |
# File 'lib/by_star/shared.rb', line 2 def conditions_for_range(start_time, end_time, field=nil) field = "#{table_name}.#{field}" if field field ||= by_star_field ["#{field} >= ? AND #{field} <= ?", start_time.utc, end_time.utc] end |