Commit 4cfb29bc authored by marcheing's avatar marcheing

Add user id and update notice on profile creation

parent 102e17b7
......@@ -26,10 +26,11 @@ class ProfilesController < ApplicationController
# POST /profiles.json
def create
@profile = Profile.new(profile_params)
@profile.user_id = current_user.id
respond_to do |format|
if @profile.save
format.html { redirect_to @profile, notice: 'Profile was successfully created.' }
format.html { redirect_to @profile, notice: I18n.t('successfully_created_profile') }
format.json { render :show, status: :created, location: @profile }
else
format.html { render :new }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment