Sha256: f50c16b60adac7fcec677e1e75804745964c3a43bea1f546d34473615f1273c5
Contents?: true
Size: 775 Bytes
Versions: 21
Compression:
Stored size: 775 Bytes
Contents
module Spina module Admin class AccountsController < AdminController admin_section :settings before_action :set_breadcrumbs def edit end def update if current_account.update(account_params) redirect_back fallback_location: spina.edit_admin_account_path, flash: {success: t('spina.accounts.saved')} else flash.now[:error] = t('spina.accounts.couldnt_be_saved') render :edit, status: :unprocessable_entity end end private def account_params params.require(:account).permit! end def set_breadcrumbs add_breadcrumb I18n.t('spina.preferences.account'), spina.edit_admin_account_path end end end end
Version data entries
21 entries across 21 versions & 1 rubygems