Sha256: b0cf287676efe2357058f3c07da9eb6df96bb9b66115bd19556d45a005d74821

Contents?: true

Size: 515 Bytes

Versions: 3

Compression:

Stored size: 515 Bytes

Contents

module Stringex
  module ActsAsUrl
    module Adapter
      class ActiveRecord < Base
        def self.load
          ensure_loadable
          orm_class.send :include, ActsAsUrlInstanceMethods
          orm_class.send :extend, ActsAsUrlClassMethods
        end

      private

        def klass_previous_instances(&block)
          klass.find_each(:conditions => {settings.url_attribute => nil}, &block)
        end

        def self.orm_class
          ::ActiveRecord::Base
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stringex-2.0.2 lib/stringex/acts_as_url/adapter/active_record.rb
stringex-2.0.1 lib/stringex/acts_as_url/adapter/active_record.rb
stringex-2.0.0 lib/stringex/acts_as_url/adapter/active_record.rb