Sha256: 29daff6b9d4043f89c53bc6bf7b355149796f413fc7e543cc64cdb0baafeb072
Contents?: true
Size: 898 Bytes
Versions: 1
Compression:
Stored size: 898 Bytes
Contents
class ProfilesController < ApplicationController before_filter :authenticate before_action :set_profile def show end def edit end def update if @profile.update_attributes(profile_params) redirect_to profile_path, notice: "<strong>Success!</strong> Your profile was updated.".html_safe else render action: "edit", warning: "<strong>Attention!</strong> A problem occurred while trying to update your profile. Plese try again".html_safe end end def history @activities = doer.activities.by_recent end private # Use callbacks to share common setup or constraints between actions. def set_profile @profile = Profile.find(current_user) end # Never trust parameters from the scary internet, only allow the white list through. def profile_params params.require(:profile).permit( :first_name, :last_name, :other_name ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tkh_mailing_list-0.10 | app/controllers/profiles_controller.rb |