Sha256: b9418e3aebee6c80399663def8499267d5f9fe9cb5de1ffa536b40bb461f7161

Contents?: true

Size: 173 Bytes

Versions: 2

Compression:

Stored size: 173 Bytes

Contents

class Node < ActiveRecord::Base
  has_many   :reports, dependent: :delete_all

  def self.get_with_reports id
    Node.where("id = ?", id).includes(:reports).first
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-herald-0.1.1 lib/puppet-herald/models/node.rb
puppet-herald-0.1.0 lib/puppet-herald/models/node.rb