Sha256: 84ba569217d59e377817142c713996174b34d815df33479a7e9320029558ecef

Contents?: true

Size: 687 Bytes

Versions: 7

Compression:

Stored size: 687 Bytes

Contents

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

      # 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

7 entries across 7 versions & 1 rubygems

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