Skip to content

Commit 366ea17

Browse files
author
Hilda Stastna
committed
Get proper record class for host controller
1 parent a857c18 commit 366ea17

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/controllers/host_controller.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ def self.display_methods
1717
]
1818
end
1919

20+
def record_class
21+
case params[:display] || @display
22+
when 'storages'
23+
Storage
24+
when 'vms', 'miq_templates'
25+
VmOrTemplate
26+
else
27+
Host
28+
end
29+
end
30+
2031
def display_config_info
2132
@showtype = "config"
2233
title = case @display

0 commit comments

Comments
 (0)