From 27d6a5644302634d2ff87ceb1e6a1d34d398115a Mon Sep 17 00:00:00 2001 From: Sergei Tsoganov Date: Tue, 19 Sep 2023 16:55:27 +0300 Subject: [PATCH] Fixed missing constants --- app/models/auction.rb | 3 --- app/models/auction/searchable.rb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/auction.rb b/app/models/auction.rb index b9cbd08fc..55412d7a5 100644 --- a/app/models/auction.rb +++ b/app/models/auction.rb @@ -4,9 +4,6 @@ class Auction < ApplicationRecord include Searchable include PgSearch::Model - BLIND = '0'.freeze - ENGLISH = '1'.freeze - after_create :find_auction_turns validates :domain_name, presence: true diff --git a/app/models/auction/searchable.rb b/app/models/auction/searchable.rb index aebd19c58..b80fe5f51 100644 --- a/app/models/auction/searchable.rb +++ b/app/models/auction/searchable.rb @@ -2,6 +2,9 @@ module Auction::Searchable extend ActiveSupport::Concern + BLIND = '0'.freeze + ENGLISH = '1'.freeze + included do scope :active, -> { where('starts_at <= ? AND ends_at >= ?', Time.now.utc, Time.now.utc) } scope :without_result, lambda {