class GamificationPluginMyprofileController < MyProfileController def enable_gamification toggle_gamification(false) end def disable_gamification toggle_gamification(true) end protected def toggle_gamification(disabled = false) current_person.update_attribute(:gamification_plugin_disabled, disabled) redirect_to :controller => 'profile_editor', :action => 'edit' end end