Class: ActiveRecord::Temporal::Querying::Scoping
- Inherits:
-
Object
- Object
- ActiveRecord::Temporal::Querying::Scoping
- Defined in:
- lib/activerecord/temporal/querying/scoping.rb
Class Method Summary collapse
Class Method Details
.as_of(time_coords, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/activerecord/temporal/querying/scoping.rb', line 15 def as_of(time_coords, &block) with_association_constraints(time_coords) do (time_coords, &block) end end |
.at(time_or_time_coords, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/activerecord/temporal/querying/scoping.rb', line 5 def at(time_or_time_coords, &block) if time_or_time_coords.is_a?(Hash) with_global_constraint(time_or_time_coords, &block) else without_global_constraints do with_universal_global_constraint_time(time_or_time_coords, &block) end end end |