``` ruby
has_many :issues, -> { order(state: :desc, created_at: :desc) }, dependent: :destroy
```
or
``` ruby
has_many :issues, -> { order(state: :desc).order(created_at: :desc) }, dependent: :destroy
```