Sha256: e4b22b6596206d4031ced1170f17786bd0d28aed8eba5247133c0417035c1fda
Contents?: true
Size: 684 Bytes
Versions: 5
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true class User::ProfileController < User::ApplicationController before_action :set_profile, only: %i[show edit update] add_breadcrumb I18n.t('view.dock.profile'), :user_profile_path def show add_breadcrumb @profile.full_name, user_profile_path respond_with(:user, @profile) end def edit add_breadcrumb t('view.tooltips.edit'), edit_user_profile_path end def update @profile.update(profile_params) respond_with(:user, @profile, location: user_profile_path) end private def set_profile @profile = current_user end def profile_params params.require(:user).permit(:name, :surname, :time_zone) end end
Version data entries
5 entries across 5 versions & 1 rubygems