This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2016-11-15 16:56:29 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-17 17:56:23 +02:00
|
|
|
class ApplicationRecord < ActiveRecord::Base
|
|
|
|
self.abstract_class = true
|
2019-08-05 19:54:29 +02:00
|
|
|
|
2018-03-26 14:02:10 +02:00
|
|
|
include Remotable
|
2019-08-05 19:54:29 +02:00
|
|
|
|
|
|
|
def boolean_with_default(key, default_value)
|
|
|
|
value = attributes[key]
|
|
|
|
|
|
|
|
if value.nil?
|
|
|
|
default_value
|
|
|
|
else
|
|
|
|
value
|
|
|
|
end
|
|
|
|
end
|
2016-08-17 17:56:23 +02:00
|
|
|
end
|