Module: PeoplesoftModels

Defined in:
lib/peoplesoft_models/base.rb,
lib/peoplesoft_models.rb,
lib/peoplesoft_models/field.rb,
lib/peoplesoft_models/record.rb,
lib/peoplesoft_models/version.rb,
lib/peoplesoft_models/effective_scope.rb

Overview

This base class exists to provide a point to alter the database connection that a developer is using to connect to PeopleSoft tables. All generated models inherit from this class instead of ActiveRecord::Base.

Defined Under Namespace

Modules: EffectiveScope Classes: Base, Field, Record

Constant Summary collapse

VERSION =
"3.0.0"

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/peoplesoft_models.rb', line 8

def self.const_missing(name)
  record_name = name.to_s.demodulize.underscore.upcase

  begin
    const_set(name, Record.find(record_name).to_model)
  rescue ActiveRecord::RecordNotFound
    super(name)
  end
end