Sha256: 2441fe7b611eeeb4e3a2352ceaf242a7dad4c97d9e6832dd49acec74da0bfa97
Contents?: true
Size: 548 Bytes
Versions: 5
Compression:
Stored size: 548 Bytes
Contents
class UsersController < ActionController::Base layout 'application' def new @user = User.new end def create @user = User.create(user_params) redirect_to edit_user_path(@user) end def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) @user.update(user_params) respond_to do |format| format.json { render json: { ok: true } } format.html { redirect_to edit_user_path } end end private def user_params params.require(:user).permit! end end
Version data entries
5 entries across 5 versions & 1 rubygems