The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
280 B

  1. # frozen_string_literal: true
  2. class ApplicationRecord < ActiveRecord::Base
  3. self.abstract_class = true
  4. include Remotable
  5. def boolean_with_default(key, default_value)
  6. value = attributes[key]
  7. if value.nil?
  8. default_value
  9. else
  10. value
  11. end
  12. end
  13. end