Class: NitroKit::UpgradeSmoke::Controller
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- NitroKit::UpgradeSmoke::Controller
- Defined in:
- lib/nitro_kit/upgrade_smoke_test.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
106 107 108 |
# File 'lib/nitro_kit/upgrade_smoke_test.rb', line 106 def show render_surface(profile: current_profile, revision: current_revision) end |
#update ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/nitro_kit/upgrade_smoke_test.rb', line 110 def update profile = Profile.new(profile_params) if profile.valid? session[SESSION_KEY] = { "name" => profile.name, "revision" => current_revision + 1 } redirect_to PATH, status: :see_other, notice: "Smoke-test profile saved" else flash.now[:alert] = "Smoke-test profile needs attention" render_surface(profile:, revision: current_revision, status: :unprocessable_entity) end end |