Sha256: 2a9b70eeede04ba132a82749c62d637843c82a4c52500533e99fb98388097250

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

require 'escape'

module Sunspot #:nodoc:
  module Rails #:nodoc:
    class Util
      class << self
        def sunspot_options
          @sunspot_options ||= {}
        end
        
        def index_relevant_attribute_changed?( object )
          class_key = object.class.to_s.underscore.to_sym
          ignore_attributes = (sunspot_options[class_key][:ignore_attribute_changes_of] || [])
          !(object.changes.symbolize_keys.keys - ignore_attributes).blank?
        end
        
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sunspot_rails-0.11.4 lib/sunspot/rails/util.rb
nxa-sunspot_rails-0.11.3 lib/sunspot/rails/util.rb
sunspot_rails-0.11.3 lib/sunspot/rails/util.rb
sunspot_rails-0.11.2 lib/sunspot/rails/util.rb
sunspot_rails-0.11.1 lib/sunspot/rails/util.rb
sunspot_rails-0.11.0 lib/sunspot/rails/util.rb