Class: Formol::PreferencesController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#last_page_forum_topic_path, #paginated_forum_topic_post_path, #per_page, #topic_last_page_number, #topic_post_page_number

Instance Method Details

#showObject



5
6
7
8
9
# File 'app/controllers/formol/preferences_controller.rb', line 5

def show
  preference
  
  respond_with(preference)
end

#updateObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/formol/preferences_controller.rb', line 11

def update
  if preference.update_attributes(params[:user_preference])
    respond_with(preference) do |format|
      format.html { redirect_to preference_path }
    end
  # No wrong case to test for now
  # just lower coverage
  # 
  #else
  #  respond_with(preference) do |format|
  #    format.html { render :show }
  #  end
  end
end