There are two models: **Discount** and **TimeDiscount**. 

Discount `has_one` TimeDiscount and TimeDiscount `belongs_to` Discount. 

I need to get all `TimeDiscounts` with associated `Discount.is_enabled` equals `true`. How can I do it? I know about scoping, and I can do something similar to this thing:

```
scope :new_orders, -> { where(order_status: OrderStatus.new_order) } 

```

Please tell me how to make use of associations here.