# class Puppet::Resource::ActiveRecord

### Public Class Methods

new() click to toggle source
Calls superclass method Puppet::Indirector::ActiveRecord.new

    # File lib/puppet/indirector/resource/active_record.rb, line 10
    def initialize
      Puppet.deprecation_warning "ActiveRecord-based storeconfigs and inventory are deprecated. See http://links.puppetlabs.com/activerecord-deprecation"
      super
    end

### Public Instance Methods

search(request) click to toggle source

    # File lib/puppet/indirector/resource/active_record.rb, line 15
    def search(request)
      type   = request_to_type_name(request)
      host   = request.options[:host]
      filter = request.options[:filter]

      if filter and filter[1] =~ /^(and|or)$/i then
        raise Puppet::Error, "Complex search on StoreConfigs resources is not supported"
      end

      query = build_active_record_query(type, host, filter)
      Puppet::Rails::Resource.find(:all, query)
    end