Skip to content

Commit

Permalink
adding inverse_of to ems in PhysicalRack
Browse files Browse the repository at this point in the history
  • Loading branch information
felipedf committed Jan 25, 2018
1 parent 9a65d82 commit 673f88a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/physical_rack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class PhysicalRack < ApplicationRecord
include SupportsFeatureMixin
include EventMixin

belongs_to :ext_management_system, :foreign_key => :ems_id, :class_name => "ManageIQ::Providers::PhysicalInfraManager"
belongs_to :ext_management_system, :foreign_key => :ems_id,
:class_name => "ManageIQ::Providers::PhysicalInfraManager", :inverse_of => :physical_racks

has_many :physical_servers, :dependent => :destroy, :inverse_of => :physical_rack
end
3 changes: 3 additions & 0 deletions spec/factories/physical_rack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FactoryGirl.define do
factory :physical_rack
end

0 comments on commit 673f88a

Please sign in to comment.