# Models the difference between two snapshots
class SnapshotDiff < ActiveRecord::Base
  has_attached_file :image

  belongs_to :before_snapshot, class_name: 'Snapshot'
  has_one    :after_snapshot,  class_name: 'Snapshot'
  has_many   :snapshot_diff_clusters

  validates_attachment_content_type :image,
                                    content_type: /\Aimage\/.*\Z/

  validates_numericality_of :diff_in_percent
end

# Models the difference between two snapshots
class SnapshotDiff < ActiveRecord::Base
  has_attached_file :image

  belongs_to :before_snapshot, class_name: 'Snapshot'
  has_one    :after_snapshot,  class_name: 'Snapshot'
  has_many   :snapshot_diff_clusters

  validates_attachment_content_type :image,
                                    content_type: /\Aimage\/.*\Z/

  validates :diff_in_percent, numericality: true
end

Use the new "sexy" validations for SnapshotDiff
Use the new "sexy" validations for SnapshotDiff

As pointed out by Rubocop. This resolves all of the cops for this file.

Change-Id: Id82cf7a6ba34c6de958ed3064ceae683a14f5fdf
