Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create
- @user = User.new(params[:user])
- respond_to do |format|
- if @user.save
- format.html { redirect_to @user, notice: 'User was successfully created.' }
- format.json { render json: @user, status: :created, location: @user }
- else
- format.html { render action: "new" }
- format.json { render json: @user.errors, status: :unprocessable_entity }
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment