diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-10 20:30:42 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-08-10 20:41:05 +0200 |
commit | 74e39b8ffaeea5ff360e7290a0a90e4e967e46fc (patch) | |
tree | 572168a3e007bb95731689d0fbaa709d368b101f /app/controllers/foreman_params_tab/hosts_controller.rb |
Diffstat (limited to 'app/controllers/foreman_params_tab/hosts_controller.rb')
-rw-r--r-- | app/controllers/foreman_params_tab/hosts_controller.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/controllers/foreman_params_tab/hosts_controller.rb b/app/controllers/foreman_params_tab/hosts_controller.rb new file mode 100644 index 0000000..1359329 --- /dev/null +++ b/app/controllers/foreman_params_tab/hosts_controller.rb @@ -0,0 +1,22 @@ +module ForemanParamsTab + class HostsController < ::HostsController + + #before_action :find_resource, :only => [:parameters] + + def parameters + @host = find_resource + render :partial => 'parameters' + rescue ActionView::Template::Error => exception + process_ajax_error exception, 'fetch parameters' + end + + def action_permission + case params[:action] + when 'parameters' + :view + else + super + end + end + end +end |