Class: Thredded::PreferencesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/thredded/preferences_controller.rb

Instance Method Summary collapse

Methods included from UrlsHelper

#delete_post_path, #edit_post_path, #edit_preferences_path, #edit_preferences_url, #mark_unread_path, #permalink_path, #post_path, #post_url, #quote_post_path, #search_path, #send_private_message_path, #topic_path, #topic_url, #unread_topics_path, #user_path

Instance Method Details

#editObject


8
# File 'app/controllers/thredded/preferences_controller.rb', line 8

def edit; end

#updateObject


10
11
12
13
14
15
16
17
# File 'app/controllers/thredded/preferences_controller.rb', line 10

def update
  if @preferences.save
    flash[:notice] = t('thredded.preferences.updated_notice')
    redirect_back fallback_location: edit_preferences_url(@preferences.messageboard)
  else
    render :edit
  end
end