We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2beabee + 783baa7 commit 9fc5dc4Copy full SHA for 9fc5dc4
app/models/block.rb
@@ -25,7 +25,7 @@ class Block < ApplicationRecord
25
attribute :uncle_block_hashes, :ckb_array_hash, hash_length: ENV["DEFAULT_HASH_LENGTH"]
26
attribute :proposals, :ckb_array_hash, hash_length: ENV["DEFAULT_SHORT_HASH_LENGTH"]
27
28
- scope :recent, -> { order(timestamp: :desc) }
+ scope :recent, -> { order("timestamp desc nulls last") }
29
scope :created_after, ->(timestamp) { where("timestamp >= ?", timestamp) }
30
scope :created_before, ->(timestamp) { where("timestamp <= ?", timestamp) }
31
scope :h24, -> { where("timestamp > ?", 24.hours.ago.to_datetime.strftime("%Q")) }
0 commit comments