lib/updateable_views_inheritance/postgresql_adapter.rb
# Returns all models' class objects that are ActiveRecord::Base descendants
Returns all models' class objects that are ActiveRecord::Base descendants
Returns all models ' class objects that are ActiveRecord :: Base descendants
def all_db_klasses
                  return @@klasses if defined?(@@klasses)
                  @@klasses = []
                  model_filenames.collect{|m| load "#{Rails.root}/app/models/#{m}";m.match(%r{([^/]+?)\.rb$})[1].camelize.constantize }.each do |klass|
                    @@klasses << klass if  klass < ActiveRecord::Base
                  end
                  @@klasses.uniq
                end
def all_db_klasses return @@klasses if defined? ( @@klasses ) @@klasses = [ ] model_filenames . collect { | m | load "#{Rails.root}/app/models/#{m}" ; m . match ( %r{ ([^/]+?) \. rb$ } ) [ 1 ] . camelize . constantize } . each do | klass | @@klasses << klass if klass < ActiveRecord :: Base end @@klasses . uniq end
Returns all models' class objects that are ActiveRecord::Base descendants
Returns all models ' class objects that are ActiveRecord :: Base descendants
# load model classes so that inheritance_column is set correctly where defined