Class: Kiqr::Users::Settings::ProfilesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/kiqr/users/settings/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#cancel_pending_emailObject



22
23
24
25
26
27
28
29
30
# File 'app/controllers/kiqr/users/settings/profiles_controller.rb', line 22

def cancel_pending_email
  @user.cancel_pending_email_change!
  kiqr_flash_message_now(:notice, :email_change_pending_cancelled)

  render turbo_stream: [
    turbo_stream.remove("pending_email_notification"),
    render_flash_messages_stream
  ]
end

#showObject

GET /settings



9
10
# File 'app/controllers/kiqr/users/settings/profiles_controller.rb', line 9

def show
end

#updateObject

PATCH /settings/profile



13
14
15
16
17
18
19
20
# File 'app/controllers/kiqr/users/settings/profiles_controller.rb', line 13

def update
  if @user.update()
    kiqr_flash_message(:success, :profile_updated)
    redirect_to 
  else
    render :show, status: :unprocessable_content
  end
end