Module: SettingConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- Fluentd::Settings::InSyslogController, Fluentd::Settings::OutElasticsearchController, Fluentd::Settings::OutForwardController, Fluentd::Settings::OutMongoController, Fluentd::Settings::OutTdController
- Defined in:
- app/controllers/concerns/setting_concern.rb
Instance Method Summary collapse
Instance Method Details
#finish ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/concerns/setting_concern.rb', line 13 def finish @setting = target_class.new(setting_params) unless @setting.valid? return render "show" end @fluentd.agent.config_append @setting.to_config if @fluentd.agent.running? unless @fluentd.agent.restart @setting.errors.add(:base, @fluentd.agent.log_tail(1).first) return render "show" end end redirect_to daemon_setting_path(@fluentd) end |
#show ⇒ Object
9 10 11 |
# File 'app/controllers/concerns/setting_concern.rb', line 9 def show @setting = target_class.new(initial_params) end |