Sha256: f878643c36022281074c3bc62b267573e7cfaf770c85a230ad8f49cd4309652b
Contents?: true
Size: 536 Bytes
Versions: 21
Compression:
Stored size: 536 Bytes
Contents
class RegistrationsController < ApplicationController def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(user_params) format.html { redirect_to(@user, :notice => 'User was successfully updated.') } format.xml { head :ok } else format.html { render "edit" } format.xml { render :xml => @user.errors, :status => :unprocessable_entity } end end end private def user_params params.require(:user).permit! end end
Version data entries
21 entries across 21 versions & 1 rubygems