module Formol class PreferencesController < ApplicationController respond_to :html def show preference respond_with(preference) end 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 protected def preference @preference ||= current_formol_user.preference end end end