# historia statusow zamowien class OrderHistory < ApplicationRecord belongs_to :order scope :by_create_desc, -> { order(created_at: :desc) } scope :by_create_asc, -> { order(created_at: :asc) } end