Sha256: 66efe47c56c5092772450523c8b80a01d77dc12072f5f6e0f3af9fccb6dad200
Contents?: true
Size: 415 Bytes
Versions: 3
Compression:
Stored size: 415 Bytes
Contents
module Admin class AdministratorsController < BaseController def update success = administrator_params[:password].present? ? resource.update(administrator_params) : resource.update_without_password(resource_params) sign_in(resource, bypass: true) if current_administrator == resource if success redirect_or_render :edit else render :edit end end end end
Version data entries
3 entries across 3 versions & 1 rubygems