Sha256: daac5c751410f2803a40e660424c963ce910f34fef0a8512a795aa1831033ab6

Contents?: true

Size: 610 Bytes

Versions: 2

Compression:

Stored size: 610 Bytes

Contents

# this shouldn't be necessary, but engines seem to have a few weak spots.
require 'will_paginate/active_record'

module BarkestCore

  ##
  # This class serves as a base class for other models.
  #
  # This way we can guarantee that all of our models can use an explicit configuration
  # when desirable.
  class DbTable < ActiveRecord::Base
    self.abstract_class = true

    # Ensure that we only establish a new connection if needed.
    unless BarkestCore.db_config.symbolize_keys == ActiveRecord::Base.connection_config.symbolize_keys
      establish_connection BarkestCore.db_config
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
barkest_core-1.5.4.0 app/models/barkest_core/db_table.rb
barkest_core-1.5.3.0 app/models/barkest_core/db_table.rb