Sha256: 8434369ae45c73f8db86c2d48e8767551a3192fb17121279a4d9ea8f99936ad4

Contents?: true

Size: 664 Bytes

Versions: 20

Compression:

Stored size: 664 Bytes

Contents

module Sfx4
  module Local
    class Base < ActiveRecord::Base
      # Was a SFX DB connection set in database.yml to connect directly to sfx?
      def self.connection_configured?
        config = ActiveRecord::Base.configurations["sfx_db"]
        (not (config.nil? or config.blank? or config["adapter"].blank?))
      end

      self.establish_connection :sfx_db if self.connection_configured?

      # ActiveRecord likes it when we tell it this is an abstract
      # class only. 
      self.abstract_class = true 

      extend Sfx4::Abstract::Base

      # All SFX things are read-only!
      def readonly?() 
        return true
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
umlaut-4.1.7 app/models/sfx4/local/base.rb
umlaut-4.1.6 app/models/sfx4/local/base.rb
umlaut-4.1.5 app/models/sfx4/local/base.rb
umlaut-4.1.4 app/models/sfx4/local/base.rb
umlaut-4.1.3 app/models/sfx4/local/base.rb
umlaut-4.1.2 app/models/sfx4/local/base.rb
umlaut-4.1.1 app/models/sfx4/local/base.rb
umlaut-4.1.0 app/models/sfx4/local/base.rb
umlaut-4.1.0.pre3 app/models/sfx4/local/base.rb
umlaut-4.1.0.pre.2 app/models/sfx4/local/base.rb
umlaut-4.1.0.pre.alpha.1 app/models/sfx4/local/base.rb
umlaut-4.0.3 app/models/sfx4/local/base.rb
umlaut-4.0.2 app/models/sfx4/local/base.rb
umlaut-4.0.1 app/models/sfx4/local/base.rb
umlaut-4.0.0 app/models/sfx4/local/base.rb
umlaut-4.0.0.beta5 app/models/sfx4/local/base.rb
umlaut-4.0.0.beta4 app/models/sfx4/local/base.rb
umlaut-4.0.0.beta3 app/models/sfx4/local/base.rb
umlaut-4.0.0.beta2 app/models/sfx4/local/base.rb
umlaut-4.0.0.beta1 app/models/sfx4/local/base.rb