vendor/plugins/acts_as_comparable/lib/acts_as_comparable/acts_as_comparable.rb
# Returns true if the passed in +other+ model is different then this
# model given the fields that are marked as comparable. Otherwise
# returns false.
#
# == Arguments
# * other - another ActiveRecord model to compare this model against
# * options - a hash of options. All options for ActiveRecord::Acts::Comparable::ClassMethods.acts_as_comparable apply.
#
Returns true if the passed in +other+ model is different then this
model given the fields that are marked as comparable. Otherwise
returns false.

Arguments
other - another ActiveRecord model to compare this model against
options - a hash of options.
Returns true if the passed in + other + model is different then this model given the fields that are marked as comparable . Otherwise returns false . Arguments other - another ActiveRecord model to compare this model against options - a hash of options .
def different?( other = nil, options = nil )
      other ||= self.new_record? ? self.class.new : self.class.find( self.id )
      comparable_attributes_for( options ).each_pair do |attr, action|
        if action.is_a? Proc
          return true unless action.call( self ) == action.call( other )
        else
          return true unless self.send( attr ) == other.send( attr )
        end
      end
      false
    end
def different? ( other = nil , options = nil ) other ||= self . new_record? ? self . class . new : self . class . find ( self . id ) comparable_attributes_for ( options ) . each_pair do | attr , action | if action . is_a? Proc return true unless action . call ( self ) == action . call ( other ) else return true unless self . send ( attr ) == other . send ( attr ) end end false end
Returns true if the passed in +other+ model is different then this
model given the fields that are marked as comparable.
Returns true if the passed in + other + model is different then this model given the fields that are marked as comparable .
other
<not_specific>
options
<not_specific>