Sha256: 93f6af9dffa9fe4fc0e53074ae0c8cd11c851e25fefad1ce403a00f8114065d5
Contents?: true
Size: 484 Bytes
Versions: 3
Compression:
Stored size: 484 Bytes
Contents
class UsersController < ApplicationController before_action :find_user def show end def update unless @user.update_attributes(user_params) return render :show end session[:succeed_password] = user_params[:password] redirect_to user_path end private def find_user @user = User.new(name: "admin") # user is only "admin" end def user_params params.require(:user).permit(:current_password, :password, :password_confirmation) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fluentd-ui-0.2.0 | app/controllers/users_controller.rb |
fluentd-ui-0.1.4 | app/controllers/users_controller.rb |
fluentd-ui-0.1.3 | app/controllers/users_controller.rb |