Sha256: 05918f171d3881983dcfbdb9997f7530748a9a45b3bcd1743c401034532c6cb9
Contents?: true
Size: 528 Bytes
Versions: 12
Compression:
Stored size: 528 Bytes
Contents
class UsersController < ApplicationController before_filter :authenticate_user! before_filter :correct_user?, :except => [:index] def index @users = User.all end def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) if @user.update_attributes(secure_params) redirect_to @user else render :edit end end def show @user = User.find(params[:id]) end private def secure_params params.require(:user).permit(:email) end end
Version data entries
12 entries across 12 versions & 1 rubygems