Skip to content

Instantly share code, notes, and snippets.

@elct9620
Created March 12, 2020 05:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elct9620/4eae938df60b6d9e41aa7183cdb45cf7 to your computer and use it in GitHub Desktop.
Save elct9620/4eae938df60b6d9e41aa7183cdb45cf7 to your computer and use it in GitHub Desktop.
Simple settings model for Rails
# frozen_string_literal: true
require "singleton"
class Settings
include Singleton
class << self
delegate_missing_to :instance
end
delegate_missing_to :@config
def initialize
@config = Rails.application.config_for(:settings)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment