Skip to content

Commit

Permalink
Setting PhysicalSwitch as its base model
Browse files Browse the repository at this point in the history
  • Loading branch information
EsdrasVP committed May 18, 2018
1 parent 9d5ed08 commit fbc0d39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/physical_switch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class PhysicalSwitch < Switch

belongs_to :ext_management_system, :foreign_key => :ems_id, :inverse_of => :physical_switches

def self.base_model
PhysicalSwitch
end

def my_zone
ems = ext_management_system
ems ? ems.my_zone : MiqServer.my_zone
Expand Down

0 comments on commit fbc0d39

Please sign in to comment.