fluentd-ui/app/controllers/fluentd/settings/out_forward_controller.rb
uu59 3c7786f262 Refactor plugin setting
Adding support for some plugins was hard.
After this commit, easy to add a plugin that has commonly
setting style.

Before:
- Add model, controller, and views for it.

After:
- Add model and controller. view is shared.
2014-11-04 14:29:31 +09:00

19 lines
503 B
Ruby

class Fluentd::Settings::OutForwardController < ApplicationController
include SettingConcern
private
def target_class
Fluentd::Setting::OutForward
end
def setting_params
params.require(:fluentd_setting_out_forward).permit(*Fluentd::Setting::OutForward::KEYS).merge(
params.require(:fluentd_setting_out_forward).permit(
:server => Fluentd::Setting::OutForward::Server::KEYS,
:secondary => Fluentd::Setting::OutForward::Secondary::KEYS,
),
)
end
end