about summary refs log blame commit diff
path: root/app/models/application_record.rb
blob: 5d7d3a09610a375633fde62188cfe514801b2f72 (plain) (tree)
1
2
3
4
5
6
7
                             
                                            
 
                   
 




                                                 







                                              
   
# frozen_string_literal: true

class ApplicationRecord < ActiveRecord::Base
  self.abstract_class = true

  include Remotable

  class << self
    def update_index(_type_name, *_args, &_block)
      super if Chewy.enabled?
    end
  end

  def boolean_with_default(key, default_value)
    value = attributes[key]

    if value.nil?
      default_value
    else
      value
    end
  end
end