title: ActiveRecord singleton dangerous?
body: <p>I write the following code. The purpose is to avoid query to my database with active record.</p>
  
  <p>The only reason to made a request to the databse is an update (after_save).</p>
  
  <pre><code>class Configuration &lt; ActiveRecord::Base
  
    def self.instance
      ConfigurationSingleton.instance.active_record_instance
    end
  
    class ConfigurationSingleton
      include Singleton
  
      def initialize
        @active_record_instance = Configuration.first || Configuration.new
      end
  
      def active_record_instance
        @active_record_instance
      end
    end
  
    after_save Proc.new { ConfigurationSingleton.instance.active_record_instance.reload }
  end
  </code></pre>
  
  <p>It seem to work well in developement mode but i feel insecure. 
  Does this code safe running with apache passenger on production with several separate process?</p>