Sha256: 0b48f402842d4b089951c390fd154085fda6981776c0753fa3c0ff8c43b3a80c

Contents?: true

Size: 669 Bytes

Versions: 7

Compression:

Stored size: 669 Bytes

Contents

module Sfx4
  module Global
    class Base < ActiveRecord::Base
      attr_accessible

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

      self.establish_connection :sfx4_global if self.connection_configured?

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
umlaut-3.3.1 app/models/sfx4/global/base.rb
umlaut-3.3.0 app/models/sfx4/global/base.rb
umlaut-3.2.0 app/models/sfx4/global/base.rb
umlaut-3.1.1 app/models/sfx4/global/base.rb
umlaut-3.1.0 app/models/sfx4/global/base.rb
umlaut-3.1.0.pre2 app/models/sfx4/global/base.rb
umlaut-3.1.0.pre1 app/models/sfx4/global/base.rb