Class: PromptEngine::SettingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/prompt_engine/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



6
7
8
# File 'app/controllers/prompt_engine/settings_controller.rb', line 6

def edit
  # Just display the form
end

#updateObject



10
11
12
13
14
15
16
# File 'app/controllers/prompt_engine/settings_controller.rb', line 10

def update
  if @settings.update(settings_params)
    redirect_to edit_settings_path, notice: "Settings have been updated successfully."
  else
    render :edit, status: :unprocessable_entity
  end
end